fn build_item(&self, link: &LinkInfo) -> Item {

        // Use the link as title if it cannot be scraped

        let title = match link.title { 
            Some(ref title) => title.to_string(),
            _ => link.url.to_string(),
        };

        let mut guid = Guid::default();
        guid.set_value(link.resolved_url.as_str());
        guid.set_permalink(true);

        ItemBuilder::default()
            .title(title)
            .link(link.url.to_string())
            .pub_date(link.publication_date.and_then(|d| Some(d.to_rfc2822())))
            .guid(guid)
            .build()
            .unwrap()
    }
/// Creates an RSS Feed item from a link
Creates an RSS Feed item from a link
Creates an RSS Feed item from a link
fn build_item(&self, link: &LinkInfo) -> Item {
        // Use the link as title if it cannot be scraped
        let title = match link.title { 
            Some(ref title) => title.to_string(),
            _ => link.url.to_string(),
        };
        let mut guid = Guid::default();
        guid.set_value(link.resolved_url.as_str());
        guid.set_permalink(true);
        ItemBuilder::default()
            .title(title)
            .link(link.url.to_string())
            .pub_date(link.publication_date.and_then(|d| Some(d.to_rfc2822())))
            .guid(guid)
            .build()
            .unwrap()
    }
fn build_item ( & self , link : & LinkInfo ) -> Item { // Use the link as title if it cannot be scraped let title = match link . title { Some ( ref title ) => title . to_string ( ) , _ => link . url . to_string ( ) , } ; let mut guid = Guid :: default ( ) ; guid . set_value ( link . resolved_url . as_str ( ) ) ; guid . set_permalink ( true ) ; ItemBuilder :: default ( ) . title ( title ) . link ( link . url . to_string ( ) ) . pub_date ( link . publication_date . and_then ( | d | Some ( d . to_rfc2822 ( ) ) ) ) . guid ( guid ) . build ( ) . unwrap ( ) }
Creates an RSS Feed item from a link
Creates an RSS Feed item from a link
&self
link
&LinkInfo
&self
link
&LinkInfo