pub struct ReadOptions {
    pub count: Option<u64>,
    pub block: Option<Duration>,
}Expand description
Options for XREAD and XREADGROUP commands
Fields§
§count: Option<u64>Maximum number of entries per stream
block: Option<Duration>Block timeout in milliseconds (None for non-blocking)
Implementations§
Source§impl ReadOptions
 
impl ReadOptions
Sourcepub fn with_count(self, count: u64) -> Self
 
pub fn with_count(self, count: u64) -> Self
Set the maximum number of entries per stream
Sourcepub fn with_block(self, timeout: Duration) -> Self
 
pub fn with_block(self, timeout: Duration) -> Self
Set the block timeout
Sourcepub fn non_blocking(count: u64) -> Self
 
pub fn non_blocking(count: u64) -> Self
Create non-blocking read options with count limit
Trait Implementations§
Source§impl Clone for ReadOptions
 
impl Clone for ReadOptions
Source§fn clone(&self) -> ReadOptions
 
fn clone(&self) -> ReadOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for ReadOptions
 
impl Debug for ReadOptions
Auto Trait Implementations§
impl Freeze for ReadOptions
impl RefUnwindSafe for ReadOptions
impl Send for ReadOptions
impl Sync for ReadOptions
impl Unpin for ReadOptions
impl UnwindSafe for ReadOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more