fn filter_missing_entries(
        &'a self,
        feed_id: i64,
        entries: &'a [&'a FeedExt],
    ) -> Result<Vec<&FeedExt>, Error> {
        let database = self.database.as_ref().unwrap();

        let mut stmt = database
            .connection()
            .prepare("SELECT guid FROM entries WHERE feed_id = ?1 AND guid = ?2")?;

        let new_entries: Vec<&FeedExt> = entries
            .iter()
            .filter(|e| e.guid().is_some())
            .filter(
                |e| match stmt.exists(&[&feed_id as &ToSql, &e.guid().unwrap()]) {
                    Ok(true) => false,
                    Ok(false) => true,
                    Err(_) => true,
                },
            )
            .map(Deref::deref)
            .collect::<Vec<&FeedExt>>();

        Ok(new_entries)
    }
/// Filters the given slice of entries and returns a Vec with entries that are not currently
/// saved in the database.
Filters the given slice of entries and returns a Vec with entries that are not currently
saved in the database.
Filters the given slice of entries and returns a Vec with entries that are not currently saved in the database .
fn filter_missing_entries(
        &'a self,
        feed_id: i64,
        entries: &'a [&'a FeedExt],
    ) -> Result<Vec<&FeedExt>, Error> {
        let database = self.database.as_ref().unwrap();
        let mut stmt = database
            .connection()
            .prepare("SELECT guid FROM entries WHERE feed_id = ?1 AND guid = ?2")?;
        let new_entries: Vec<&FeedExt> = entries
            .iter()
            .filter(|e| e.guid().is_some())
            .filter(
                |e| match stmt.exists(&[&feed_id as &ToSql, &e.guid().unwrap()]) {
                    Ok(true) => false,
                    Ok(false) => true,
                    Err(_) => true,
                },
            )
            .map(Deref::deref)
            .collect::<Vec<&FeedExt>>();
        Ok(new_entries)
    }
fn filter_missing_entries ( & ' a self , feed_id : i64 , entries : & ' a [ & ' a FeedExt ] , ) -> Result < Vec < & FeedExt > , Error > { let database = self . database . as_ref ( ) . unwrap ( ) ; let mut stmt = database . connection ( ) . prepare ( " " ) ? ; let new_entries : Vec < & FeedExt > = entries . iter ( ) . filter ( | e | e . guid ( ) . is_some ( ) ) . filter ( | e | match stmt . exists ( & [ & feed_id as & ToSql , & e . guid ( ) . unwrap ( ) ] ) { Ok ( true ) => false , Ok ( false ) => true , Err ( _ ) => true , } , ) . map ( Deref :: deref ) . collect :: < Vec < & FeedExt > > ( ) ; Ok ( new_entries ) }
Filters the given slice of entries and returns a Vec with entries that are not currently
saved in the database.
Filters the given slice of entries and returns a Vec with entries that are not currently saved in the database .
&'a self
feed_id
i64
entries
&'a [&'a FeedExt]