pub struct ScanOptions {
pub pattern: String,
pub batch_size: usize,
pub count_hint: usize,
pub n_rows: Option<usize>,
pub parallel: ParallelStrategy,
}Expand description
Common scan options shared across all Redis data types.
Fields§
§pattern: StringKey pattern to match (e.g., “user:*”).
batch_size: usizeNumber of keys to process per batch.
count_hint: usizeSCAN COUNT hint for Redis.
n_rows: Option<usize>Maximum total rows to return (None for unlimited).
parallel: ParallelStrategyParallel processing strategy.
Implementations§
Source§impl ScanOptions
impl ScanOptions
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_parallel(self, strategy: ParallelStrategy) -> Self
pub fn with_parallel(self, strategy: ParallelStrategy) -> Self
Set the parallel processing strategy.
Trait Implementations§
Source§impl Clone for ScanOptions
impl Clone for ScanOptions
Source§fn clone(&self) -> ScanOptions
fn clone(&self) -> ScanOptions
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 ScanOptions
impl Debug for ScanOptions
Source§impl Default for ScanOptions
impl Default for ScanOptions
Source§impl From<BatchConfig> for ScanOptions
impl From<BatchConfig> for ScanOptions
Source§fn from(config: BatchConfig) -> Self
fn from(config: BatchConfig) -> Self
Converts to this type from the input type.
Source§impl From<ScanOptions> for BatchConfig
impl From<ScanOptions> for BatchConfig
Source§fn from(opts: ScanOptions) -> Self
fn from(opts: ScanOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ScanOptions
impl RefUnwindSafe for ScanOptions
impl Send for ScanOptions
impl Sync for ScanOptions
impl Unpin for ScanOptions
impl UnwindSafe for ScanOptions
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