pub struct SerializableReadSession { /* private fields */ }Expand description
A session whose read floor advances to the highest Store sequence observed.
An explicit initial floor constrains reads without claiming that any read has evaluated at that sequence. Reads started after a response is observed use at least its sequence. Clones share the floor, including updates from streams.
Streamed reads record response sequences as frames arrive, including the first frame fetched before the stream is returned to the caller.
Implementations§
Source§impl SerializableReadSession
impl SerializableReadSession
Sourcepub fn fixed_sequence(&self) -> Option<u64>
pub fn fixed_sequence(&self) -> Option<u64>
Minimum Store sequence requested by subsequent reads.
Before any response, this is the explicitly configured floor, if present. It advances as reads observe newer Store sequences.
Sourcepub fn evaluated_sequence(&self) -> Option<u64>
pub fn evaluated_sequence(&self) -> Option<u64>
Highest positive Store sequence reported by a read in this session.
Returns None until a positive sequence is observed, including after reads that report zero.
Sourcepub fn with_client(&self, client: PrefixedStoreClient) -> Self
pub fn with_client(&self, client: PrefixedStoreClient) -> Self
Share this session’s freshness state with another client for the same Store.
pub async fn get(&self, key: &Key) -> Result<Option<Bytes>, ClientError>
pub async fn get_many( &self, keys: &[&Key], batch_size: u32, ) -> Result<GetManyStream, ClientError>
pub async fn range( &self, start: &Key, end: &Key, limit: usize, ) -> Result<Vec<(Key, Bytes)>, ClientError>
pub async fn range_with_mode( &self, start: &Key, end: &Key, limit: usize, mode: RangeMode, ) -> Result<Vec<(Key, Bytes)>, ClientError>
pub async fn range_stream( &self, start: &Key, end: &Key, limit: usize, batch_size: usize, ) -> Result<RangeStream, ClientError>
pub async fn range_stream_with_mode( &self, start: &Key, end: &Key, limit: usize, batch_size: usize, mode: RangeMode, ) -> Result<RangeStream, ClientError>
pub async fn range_reduce( &self, start: &Key, end: &Key, request: &DomainRangeReduceRequest, ) -> Result<Vec<Option<KvReducedValue>>, ClientError>
pub async fn range_reduce_stream( &self, start: &Key, end: &Key, request: &DomainRangeReduceRequest, ) -> Result<ReduceStream, ClientError>
Trait Implementations§
Source§impl Clone for SerializableReadSession
impl Clone for SerializableReadSession
Source§fn clone(&self) -> SerializableReadSession
fn clone(&self) -> SerializableReadSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more