pub fn formatted_urls(&self, word: &str) -> Result<Vec<Url>> {
        log::trace!("enter: formatted_urls({})", word);

        let mut urls = vec![];

        let slash = if self.handles.config.add_slash {
            Some("/")
        } else {
            None
        };

        match self.format(word, slash) {
            // default request, i.e. no extension
            Ok(url) => urls.push(url),
            Err(_) => self.handles.stats.send(AddError(UrlFormat))?,
        }

        for ext in self.handles.config.extensions.iter() {
            match self.format(word, Some(ext)) {
                // any extensions passed in
                Ok(url) => urls.push(url),
                Err(_) => self.handles.stats.send(AddError(UrlFormat))?,
            }
        }
        log::trace!("exit: formatted_urls -> {:?}", urls);
        Ok(urls)
    }
/// Creates a vector of formatted Urls
///
/// At least one value will be returned (base_url + word)
///
/// If any extensions were passed to the program, each extension will add a
/// (base_url + word + ext) Url to the vector
Creates a vector of formatted Urls
At least one value will be returned (base_url + word)

If any extensions were passed to the program, each extension will add a
(base_url + word + ext) Url to the vector
Creates a vector of formatted Urls At least one value will be returned ( base_url + word ) If any extensions were passed to the program each extension will add a ( base_url + word + ext ) Url to the vector
pub fn formatted_urls(&self, word: &str) -> Result<Vec<Url>> {
        log::trace!("enter: formatted_urls({})", word);
        let mut urls = vec![];
        let slash = if self.handles.config.add_slash {
            Some("/")
        } else {
            None
        };
        match self.format(word, slash) {
            // default request, i.e. no extension
            Ok(url) => urls.push(url),
            Err(_) => self.handles.stats.send(AddError(UrlFormat))?,
        }
        for ext in self.handles.config.extensions.iter() {
            match self.format(word, Some(ext)) {
                // any extensions passed in
                Ok(url) => urls.push(url),
                Err(_) => self.handles.stats.send(AddError(UrlFormat))?,
            }
        }
        log::trace!("exit: formatted_urls -> {:?}", urls);
        Ok(urls)
    }
pub fn formatted_urls ( & self , word : & str ) -> Result < Vec < Url > > { log :: trace ! ( " " word ) ; let mut urls = vec ! [ ] ; let slash = if self . handles . config . add_slash { Some ( " " ) } else { None } ; match self . format ( word , slash ) { // default request, i.e. no extension Ok ( url ) => urls . push ( url ) , Err ( _ ) => self . handles . stats . send ( AddError ( UrlFormat ) ) ? , } for ext in self . handles . config . extensions . iter ( ) { match self . format ( word , Some ( ext ) ) { // any extensions passed in Ok ( url ) => urls . push ( url ) , Err ( _ ) => self . handles . stats . send ( AddError ( UrlFormat ) ) ? , } } log :: trace ! ( " " urls ) ; Ok ( urls ) }
Creates a vector of formatted Urls
At least one value will be returned (base_url + word)
Creates a vector of formatted Urls At least one value will be returned ( base_url + word )
&self
word
&str