pub struct HashScanOptions {
pub scan: ScanOptions,
pub include_key: bool,
pub key_column_name: Option<String>,
pub include_ttl: bool,
pub ttl_column_name: Option<String>,
pub row_index: Option<RowIndex>,
pub projection: 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_ttl: boolWhether to include TTL.
ttl_column_name: Option<String>Custom name for the TTL column.
row_index: Option<RowIndex>Row index configuration.
projection: Option<Vec<String>>Fields to fetch (None = all via HGETALL).
Implementations§
Source§impl HashScanOptions
impl HashScanOptions
Sourcepub fn new(pattern: impl Into<String>) -> Self
pub fn new(pattern: impl Into<String>) -> Self
Create new HashScanOptions 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_key_column_name(self, name: impl Into<String>) -> Self
pub fn with_key_column_name(self, name: impl Into<String>) -> Self
Set a custom name for the key column.
Sourcepub fn with_ttl_column_name(self, name: impl Into<String>) -> Self
pub fn with_ttl_column_name(self, name: impl Into<String>) -> Self
Set a custom name for the TTL 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_projection(self, fields: Vec<impl Into<String>>) -> Self
pub fn with_projection(self, fields: Vec<impl Into<String>>) -> Self
Set the fields to fetch (projection).
Trait Implementations§
Source§impl Clone for HashScanOptions
impl Clone for HashScanOptions
Source§fn clone(&self) -> HashScanOptions
fn clone(&self) -> HashScanOptions
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 HashScanOptions
impl Debug for HashScanOptions
Auto Trait Implementations§
impl Freeze for HashScanOptions
impl RefUnwindSafe for HashScanOptions
impl Send for HashScanOptions
impl Sync for HashScanOptions
impl Unpin for HashScanOptions
impl UnwindSafe for HashScanOptions
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