pub struct ScanParams {
pub limit: Option<usize>,
pub start_key: Option<Key>,
pub segment: Option<usize>,
pub total_segments: Option<usize>,
}Expand description
Scan parameters for table/stripe scanning
Fields§
§limit: Option<usize>Maximum items to return
start_key: Option<Key>Start key for pagination (exclusive)
segment: Option<usize>Segment number (for parallel scans, 0-based)
total_segments: Option<usize>Total number of segments (for parallel scans)
Implementations§
Source§impl ScanParams
impl ScanParams
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Set limit
Sourcepub fn with_start_key(self, key: Key) -> Self
pub fn with_start_key(self, key: Key) -> Self
Set start key for pagination
Sourcepub fn with_segment(self, segment: usize, total_segments: usize) -> Self
pub fn with_segment(self, segment: usize, total_segments: usize) -> Self
Set parallel scan parameters
Sourcepub fn should_scan_stripe(&self, stripe_id: usize) -> bool
pub fn should_scan_stripe(&self, stripe_id: usize) -> bool
Check if a stripe should be scanned by this segment
Sourcepub fn should_skip(&self, key: &Key) -> bool
pub fn should_skip(&self, key: &Key) -> bool
Check if we should skip a key based on pagination start_key
Trait Implementations§
Source§impl Clone for ScanParams
impl Clone for ScanParams
Source§fn clone(&self) -> ScanParams
fn clone(&self) -> ScanParams
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 ScanParams
impl Debug for ScanParams
Auto Trait Implementations§
impl !Freeze for ScanParams
impl RefUnwindSafe for ScanParams
impl Send for ScanParams
impl Sync for ScanParams
impl Unpin for ScanParams
impl UnwindSafe for ScanParams
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