fn search_for_tag(&self, tags: &str) -> Tag {
        // Splits string into multiple tags before filtering syntax ones away before processing each one
        // into a tag struct.
        let map = tags
            .split(' ')
            .filter(|elem| !elem.contains(':') && !elem.starts_with('-'))
            .map(|e| match self.request_sender.get_tags_by_name(e).first() {
                Some(entry) => self.create_tag(tags, entry),
                None => self.create_tag(tags, &self.get_tag_from_alias(e)),
            });

        // Tries to return any tag in the map with category special, return the last element otherwise.
        map.clone()
            .find(|tag| tag.search_type == TagCategory::Special)
            .unwrap_or_else(|| map.last().unwrap())
    }
/// Search for tag on e621.
Search for tag on e621.
Search for tag on e621 .
fn search_for_tag(&self, tags: &str) -> Tag {
        // Splits string into multiple tags before filtering syntax ones away before processing each one
        // into a tag struct.
        let map = tags
            .split(' ')
            .filter(|elem| !elem.contains(':') && !elem.starts_with('-'))
            .map(|e| match self.request_sender.get_tags_by_name(e).first() {
                Some(entry) => self.create_tag(tags, entry),
                None => self.create_tag(tags, &self.get_tag_from_alias(e)),
            });
        // Tries to return any tag in the map with category special, return the last element otherwise.
        map.clone()
            .find(|tag| tag.search_type == TagCategory::Special)
            .unwrap_or_else(|| map.last().unwrap())
    }
fn search_for_tag ( & self , tags : & str ) -> Tag { // Splits string into multiple tags before filtering syntax ones away before processing each one // into a tag struct. let map = tags . split ( ' ' ) . filter ( | elem | ! elem . contains ( ':' ) && ! elem . starts_with ( '-' ) ) . map ( | e | match self . request_sender . get_tags_by_name ( e ) . first ( ) { Some ( entry ) => self . create_tag ( tags , entry ) , None => self . create_tag ( tags , & self . get_tag_from_alias ( e ) ) , } ) ; // Tries to return any tag in the map with category special, return the last element otherwise. map . clone ( ) . find ( | tag | tag . search_type == TagCategory :: Special ) . unwrap_or_else ( | | map . last ( ) . unwrap ( ) ) }
Search for tag on e621.
Search for tag on e621 .
&self
tags
&str
&self
tags
&str