/// Read keys as an Async Stream. This method deserializes the Key based on the type.
Read keys as an Async Stream. This method deserializes the Key based on the type.
Read keys as an Async Stream . This method deserializes the Key based on the type .
pub fn read_keys_stream<'stream, 'map: 'stream, K: 'stream>(
        &'map self,
        max_keys_at_once: i32,
    ) -> impl Stream<Item = Result<(K, Version), TableError>> + 'stream
    where
        K: Serialize + serde::de::DeserializeOwned + std::marker::Unpin,
    {
        try_stream! {
            let mut token: Vec<u8> = Vec::new();
            loop {
                let res: (Vec<(Vec<u8>, Version)>, Vec<u8>) = self.read_keys_raw(max_keys_at_once, &token).await?;
                let (keys, t) = res;
                if keys.is_empty() {
                    break;
                } else {
                    for (key_raw, version) in keys {
                       let key: K = from_slice(key_raw.as_slice()).expect("error during deserialization");
                        yield (key, version)
                    }
                    token = t;
                }
             }
        }
    }
pub fn read_keys_stream < ' stream , ' map : ' stream , K : ' stream > ( & ' map self , max_keys_at_once : i32 , ) -> impl Stream < Item = Result < ( K , Version ) , TableError > > + ' stream where K : Serialize + serde :: de :: DeserializeOwned + std :: marker :: Unpin , { try_stream ! { let mut token Vec u8 Vec new ( ) loop { let res ( Vec ( Vec u8 Version ) Vec u8 ) self read_keys_raw ( max_keys_at_once token ) await let ( keys t ) res if keys is_empty ( ) { break } else { for ( key_raw version ) in keys { let key K from_slice ( key_raw as_slice ( ) ) expect ( " " ) yield ( key version ) } token t } } } }
Read keys as an Async Stream.
Read keys as an Async Stream .
&'map self
max_keys_at_once
i32