pub struct StreamScanOptions {
pub scan: ScanOptions,
pub include_key: bool,
pub key_column_name: Option<String>,
pub include_id: bool,
pub include_timestamp: bool,
pub include_sequence: bool,
pub row_index: Option<RowIndex>,
pub start_id: String,
pub end_id: String,
pub count_per_stream: Option<usize>,
pub fields: Option<Vec<String>>,
}Expand description
Fields§
§scan: ScanOptionsBase scan options.
include_key: boolWhether to include the key column.
key_column_name: Option<String>Custom name for the key column.
include_id: boolWhether to include the entry ID.
include_timestamp: boolWhether to include timestamp.
include_sequence: boolWhether to include sequence number.
row_index: Option<RowIndex>Row index configuration.
start_id: StringStart ID for XRANGE (default: “-”).
end_id: StringEnd ID for XRANGE (default: “+”).
count_per_stream: Option<usize>Maximum entries per stream.
fields: Option<Vec<String>>Fields to extract from stream entries.
Implementations§
Source§impl StreamScanOptions
impl StreamScanOptions
Sourcepub fn new(pattern: impl Into<String>) -> Self
pub fn new(pattern: impl Into<String>) -> Self
Create new StreamScanOptions with the given pattern.
Sourcepub fn with_batch_size(self, size: usize) -> Self
pub fn with_batch_size(self, size: usize) -> Self
Set the batch size.
Sourcepub fn with_count_hint(self, count: usize) -> Self
pub fn with_count_hint(self, count: usize) -> Self
Set the COUNT hint for SCAN.
Sourcepub fn with_n_rows(self, n: usize) -> Self
pub fn with_n_rows(self, n: usize) -> Self
Set the maximum number of rows to return.
Sourcepub fn with_timestamp(self, include: bool) -> Self
pub fn with_timestamp(self, include: bool) -> Self
Enable or disable the timestamp column.
Sourcepub fn with_sequence(self, include: bool) -> Self
pub fn with_sequence(self, include: bool) -> Self
Enable or disable the sequence column.
Sourcepub fn with_row_index(self, name: impl Into<String>, offset: u64) -> Self
pub fn with_row_index(self, name: impl Into<String>, offset: u64) -> Self
Set the row index configuration.
Sourcepub fn with_start_id(self, id: impl Into<String>) -> Self
pub fn with_start_id(self, id: impl Into<String>) -> Self
Set the start ID for XRANGE.
Sourcepub fn with_end_id(self, id: impl Into<String>) -> Self
pub fn with_end_id(self, id: impl Into<String>) -> Self
Set the end ID for XRANGE.
Sourcepub fn with_count_per_stream(self, count: usize) -> Self
pub fn with_count_per_stream(self, count: usize) -> Self
Set the maximum entries to fetch per stream.
Sourcepub fn with_fields(self, fields: Vec<impl Into<String>>) -> Self
pub fn with_fields(self, fields: Vec<impl Into<String>>) -> Self
Set the fields to extract from stream entries.
Trait Implementations§
Source§impl Clone for StreamScanOptions
impl Clone for StreamScanOptions
Source§fn clone(&self) -> StreamScanOptions
fn clone(&self) -> StreamScanOptions
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 StreamScanOptions
impl Debug for StreamScanOptions
Auto Trait Implementations§
impl Freeze for StreamScanOptions
impl RefUnwindSafe for StreamScanOptions
impl Send for StreamScanOptions
impl Sync for StreamScanOptions
impl Unpin for StreamScanOptions
impl UnwindSafe for StreamScanOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more