LookupResponse
pub struct LookupResponse { /* private fields */ }A response from a KV Store Lookup operation.
This type holds the Body, metadata, and generation of found key.
Methods
current_generation
View sourcefn current_generation(&self) -> u64Read the current generation of the KVStore item.
Returns the current generation in a u64
Parameters
- self: &Self
Returns
generation has a bug in this version of the SDK, and will always return 0fn generation(&self) -> u32Read the generation of the KVStore item.
Returns the generation in a u32
Parameters
- self: &Self
Returns
metadata
View sourceRead the metadata of the KVStore item.
Returns the metadata in a Option<bytes::Bytes>
Parameters
- self: &Self
Returns
take_body
View sourcefn take_body(&mut self) -> BodyReturn the Body from a LookupResponse.
Returns the body contents in a Body
Parameters
- self: &mut Self
Returns
take_body_bytes
View sourceConvert the LookupResponse body into a byte vector.
Returns the body contents in a Vec<u8>
Parameters
- self: &mut Self
Returns
try_take_body
View sourceTake and return the body from this response if it has one, otherwise return None.
After calling this method, this response will no longer have a body.
Parameters
- self: &mut Self
Returns