pub struct VerificationMemoryBudget { /* private fields */ }Expand description
A caller-shareable cap for buffered, incomplete slice data.
Whole, aligned slices are checksummed immediately and do not consume this budget. Cloning the budget makes its limit apply across all of the sessions using that clone.
Implementations§
Source§impl VerificationMemoryBudget
impl VerificationMemoryBudget
Sourcepub fn new(max_buffered_bytes: usize) -> Self
pub fn new(max_buffered_bytes: usize) -> Self
Create a budget shared by any sessions given a clone of this value.
Sourcepub fn max_buffered_bytes(&self) -> usize
pub fn max_buffered_bytes(&self) -> usize
Maximum number of buffered boundary bytes allowed across all users.
Sourcepub fn buffered_bytes(&self) -> usize
pub fn buffered_bytes(&self) -> usize
Number of bytes currently reserved by incomplete slices.
Sourcepub fn available_bytes(&self) -> usize
pub fn available_bytes(&self) -> usize
Number of additional boundary bytes that can currently be buffered.
Trait Implementations§
Source§impl Clone for VerificationMemoryBudget
impl Clone for VerificationMemoryBudget
Source§fn clone(&self) -> VerificationMemoryBudget
fn clone(&self) -> VerificationMemoryBudget
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 moreSource§impl Debug for VerificationMemoryBudget
impl Debug for VerificationMemoryBudget
Auto Trait Implementations§
impl Freeze for VerificationMemoryBudget
impl RefUnwindSafe for VerificationMemoryBudget
impl Send for VerificationMemoryBudget
impl Sync for VerificationMemoryBudget
impl Unpin for VerificationMemoryBudget
impl UnsafeUnpin for VerificationMemoryBudget
impl UnwindSafe for VerificationMemoryBudget
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more