pub fn messages_from_cids<DB, T>(db: &DB, keys: &[Cid]) -> Result<Vec<T>, Error>
where
    DB: BlockStore,
    T: DeserializeOwned,
{
    keys.iter()
        .map(|k| {
            db.get(k)
                .map_err(|e| Error::Other(e.to_string()))?
                .ok_or_else(|| Error::UndefinedKey(k.to_string()))
        })
        .collect()
}
/// Returns messages from key-value store
Returns messages from key-value store
Returns messages from key - value store
pub fn messages_from_cids<DB, T>(db: &DB, keys: &[Cid]) -> Result<Vec<T>, Error>
where
    DB: BlockStore,
    T: DeserializeOwned,
{
    keys.iter()
        .map(|k| {
            db.get(k)
                .map_err(|e| Error::Other(e.to_string()))?
                .ok_or_else(|| Error::UndefinedKey(k.to_string()))
        })
        .collect()
}
pub fn messages_from_cids < DB , T > ( db : & DB , keys : & [ Cid ] ) -> Result < Vec < T > , Error > where DB : BlockStore , T : DeserializeOwned , { keys . iter ( ) . map ( | k | { db . get ( k ) . map_err ( | e | Error :: Other ( e . to_string ( ) ) ) ? . ok_or_else ( | | Error :: UndefinedKey ( k . to_string ( ) ) ) } ) . collect ( ) }
Returns messages from key-value store
Returns messages from key - value store
db
&DB
keys
&[Cid]