pub struct IoLimits { /* private fields */ }Expand description
Limits on storage and requests owned by one input driver.
This bounds retained payload capacities, stored range descriptors and the number of ranges handed to a source at once. It excludes caller-owned slices, allocator bookkeeping/transient reallocation, source caches, codec allocations and output. It is not a process-memory limit.
Zero is valid: no owned payload, range descriptors or reads, respectively. Borrowed resident input remains usable with all three limits set to zero.
Implementations§
Source§impl IoLimits
impl IoLimits
Sourcepub const fn new(input_bytes: usize, ranges: usize, in_flight: usize) -> Self
pub const fn new(input_bytes: usize, ranges: usize, in_flight: usize) -> Self
Construct finite limits. Requests are checked before allocation or I/O.
Sourcepub const fn max_input_bytes(self) -> usize
pub const fn max_input_bytes(self) -> usize
Maximum retained driver-owned payload capacity.
Sourcepub const fn max_ranges(self) -> usize
pub const fn max_ranges(self) -> usize
Maximum range descriptors in a fetch plan (excluding codec-owned requests).
Sourcepub const fn max_in_flight(self) -> usize
pub const fn max_in_flight(self) -> usize
Maximum ranges passed to a source in one batch.
Trait Implementations§
impl Copy for IoLimits
impl Eq for IoLimits
impl StructuralPartialEq for IoLimits
Auto Trait Implementations§
impl Freeze for IoLimits
impl RefUnwindSafe for IoLimits
impl Send for IoLimits
impl Sync for IoLimits
impl Unpin for IoLimits
impl UnsafeUnpin for IoLimits
impl UnwindSafe for IoLimits
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