pub struct ReadOptions { /* private fields */ }Expand description
Aggregate logical byte budget, defaulting to the client’s policy (16 MiB). Range request lengths must fit even if EOF returns fewer bytes. Complete files share the remaining returned-data budget and fail rather than truncate.
Implementations§
Source§impl ReadOptions
impl ReadOptions
Sourcepub const fn new() -> ReadOptions
pub const fn new() -> ReadOptions
Inherit the client’s aggregate read budget.
Sourcepub const fn max_total_bytes(self, bytes: Option<NonZero<usize>>) -> ReadOptions
pub const fn max_total_bytes(self, bytes: Option<NonZero<usize>>) -> ReadOptions
Override the aggregate budget for this call; None restores inheritance.
Only nonzero overrides are representable. Stream larger files instead
of raising this when bounded memory is required.
Sourcepub const fn total_byte_limit(self) -> Option<NonZero<usize>>
pub const fn total_byte_limit(self) -> Option<NonZero<usize>>
None inherits the client’s configured read budget.
Trait Implementations§
Source§impl Clone for ReadOptions
impl Clone for ReadOptions
Source§fn clone(&self) -> ReadOptions
fn clone(&self) -> ReadOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ReadOptions
Source§impl Debug for ReadOptions
impl Debug for ReadOptions
Source§impl Default for ReadOptions
impl Default for ReadOptions
Source§fn default() -> ReadOptions
fn default() -> ReadOptions
Returns the “default value” for a type. Read more
impl Eq for ReadOptions
Source§impl PartialEq for ReadOptions
impl PartialEq for ReadOptions
impl StructuralPartialEq for ReadOptions
Auto Trait Implementations§
impl Freeze for ReadOptions
impl RefUnwindSafe for ReadOptions
impl Send for ReadOptions
impl Sync for ReadOptions
impl Unpin for ReadOptions
impl UnsafeUnpin for ReadOptions
impl UnwindSafe for ReadOptions
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