pub struct State { /* private fields */ }Expand description
Monotonic committed prefix of one bounded transfer.
Implementations§
Source§impl State
impl State
pub const fn new(limit: Len) -> Self
pub const fn is_empty(&self) -> bool
Sourcepub const fn left(&self) -> Len
pub const fn left(&self) -> Len
Returns the uncommitted suffix without discarding its backend bound.
pub const fn len(&self) -> Len
pub fn reserve(&mut self, limit: Len) -> Step<'_>
Sourcepub fn scatter<'a>(
&mut self,
cursor: &mut impl Scatter<'a>,
) -> Option<Chunk<'a, { transfer::MAX_BYTES }>>
pub fn scatter<'a>( &mut self, cursor: &mut impl Scatter<'a>, ) -> Option<Chunk<'a, { transfer::MAX_BYTES }>>
Advances an exact scatter cursor within this transfer’s remaining budget.
Sourcepub fn try_extend(&self, amount: Len) -> Result<Self, Exceeded>
pub fn try_extend(&self, amount: Len) -> Result<Self, Exceeded>
Prepares an exact extended state when the whole amount fits.
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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