pub struct RowLimit { /* private fields */ }Expand description
Hard maximums for detached fetch results.
rows and bytes are aggregate across every result set. max_sets also counts empty
sets, so a provider cannot return an unbounded number of empty boundaries.
Implementations§
Source§impl RowLimit
impl RowLimit
Sourcepub fn new(rows: usize, bytes: usize) -> Result<Self, DbError>
pub fn new(rows: usize, bytes: usize) -> Result<Self, DbError>
Creates a single-result-set limit with non-zero hard row and byte bounds.
Use RowLimit::with_max_sets when the statement may return multiple sets.
§Errors
Returns InvalidArgument if either bound is zero.
Sourcepub fn with_max_sets(
rows: usize,
bytes: usize,
max_sets: usize,
) -> Result<Self, DbError>
pub fn with_max_sets( rows: usize, bytes: usize, max_sets: usize, ) -> Result<Self, DbError>
Creates a limit with non-zero row, byte, and aggregate result-set bounds.
The set bound counts empty sets. Providers must fail, never truncate, when any bound is exceeded.
§Errors
Returns InvalidArgument with a static reason if any bound is zero.
Trait Implementations§
impl Copy for RowLimit
impl Eq for RowLimit
impl StructuralPartialEq for RowLimit
Auto Trait Implementations§
impl Forget for RowLimit
impl Freeze for RowLimit
impl Move for RowLimit
impl RefUnwindSafe for RowLimit
impl Send for RowLimit
impl Sync for RowLimit
impl Unpin for RowLimit
impl UnsafeUnpin for RowLimit
impl UnwindSafe for RowLimit
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