Struct fdb_rl::scan::scan_properties::ScanPropertiesBuilder
source · pub struct ScanPropertiesBuilder {
range_options: RangeOptions,
scan_limiter: ScanLimiter,
}Expand description
Build ScanProperties with custom RangeOptions and
ScanLimiter.
Methods can be chained. Value of ScanProperties is constructed
by calling build method.
Fields§
§range_options: RangeOptions§scan_limiter: ScanLimiterImplementations§
source§impl ScanPropertiesBuilder
impl ScanPropertiesBuilder
sourcepub fn new() -> ScanPropertiesBuilder
pub fn new() -> ScanPropertiesBuilder
Returns a new builder.
sourcepub unsafe fn set_range_options<F>(
&mut self,
f: F
) -> &mut ScanPropertiesBuilderwhere
F: FnOnce(&mut RangeOptions),
pub unsafe fn set_range_options<F>( &mut self, f: F ) -> &mut ScanPropertiesBuilderwhere F: FnOnce(&mut RangeOptions),
Set RangeOptions using a closure.
Safety
There is no way in the RangeOptions API to set a limit
of 0. Infact if you set the limit to 0, you are
indicating that you want unlimited rows, which almost always
is not the behavior that you want.
sourcepub fn set_scan_limiter(
&mut self,
scan_limiter: ScanLimiter
) -> &mut ScanPropertiesBuilder
pub fn set_scan_limiter( &mut self, scan_limiter: ScanLimiter ) -> &mut ScanPropertiesBuilder
Set ScanLimiter.
sourcepub fn build(self) -> ScanProperties
pub fn build(self) -> ScanProperties
Create the configured ScanProperties.
Trait Implementations§
source§impl Debug for ScanPropertiesBuilder
impl Debug for ScanPropertiesBuilder
source§impl Default for ScanPropertiesBuilder
impl Default for ScanPropertiesBuilder
source§fn default() -> ScanPropertiesBuilder
fn default() -> ScanPropertiesBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ScanPropertiesBuilder
impl Send for ScanPropertiesBuilder
impl Sync for ScanPropertiesBuilder
impl Unpin for ScanPropertiesBuilder
impl UnwindSafe for ScanPropertiesBuilder
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