async fn batch_get<St: Storable>(
        &self,
        ids: &[St::Key],
    ) -> Result<Vec<DbRecord>, StorageError> {
        let mut map = Vec::new();
        for key in ids.iter() {
            if let Ok(result) = self.get::<St>(key).await {
                map.push(result);
            }
            // swallow errors (i.e. not found)
        }
        Ok(map)
    }
/// Retrieve a batch of records by id
Retrieve a batch of records by id
Retrieve a batch of records by id
async fn batch_get<St: Storable>(
        &self,
        ids: &[St::Key],
    ) -> Result<Vec<DbRecord>, StorageError> {
        let mut map = Vec::new();
        for key in ids.iter() {
            if let Ok(result) = self.get::<St>(key).await {
                map.push(result);
            }
            // swallow errors (i.e. not found)
        }
        Ok(map)
    }
async fn batch_get < St : Storable > ( & self , ids : & [ St :: Key ] , ) -> Result < Vec < DbRecord > , StorageError > { let mut map = Vec :: new ( ) ; for key in ids . iter ( ) { if let Ok ( result ) = self . get :: < St > ( key ) . await { map . push ( result ) ; } // swallow errors (i.e. not found) } Ok ( map ) }
Retrieve a batch of records by id
Retrieve a batch of records by id
&self
ids
&[St::Key]
&self
ids
&[St::Key]