pub struct Edit<'a, const N: usize> { /* private fields */ }Expand description
Exclusive editable prefix and staged writes for one buffer owner.
Implementations§
Source§impl<'a, const N: usize> Edit<'a, N>
impl<'a, const N: usize> Edit<'a, N>
Sourcepub fn try_new(spare: Spare<'a>, prefix: &[u8; N]) -> Result<Self, Error>
pub fn try_new(spare: Spare<'a>, prefix: &[u8; N]) -> Result<Self, Error>
Stages a new fixed prefix without publishing its owner.
Unlike editing an existing prefix, len includes earlier staged bytes and
this new prefix; commit publishes the complete staged write.
pub fn bounded(&mut self) -> Writer<'_, 'a, false>
Sourcepub fn spare(&mut self) -> Spare<'_>
pub fn spare(&mut self) -> Spare<'_>
Stages another suffix while retaining this edit’s disjoint fixed prefix.
pub fn prefix(&mut self) -> &mut [u8; N]
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn commit(self)
Trait Implementations§
Auto Trait Implementations§
impl<'a, const N: usize> !Send for Edit<'a, N>
impl<'a, const N: usize> !Sync for Edit<'a, N>
impl<'a, const N: usize> !UnwindSafe for Edit<'a, N>
impl<'a, const N: usize> Freeze for Edit<'a, N>
impl<'a, const N: usize> RefUnwindSafe for Edit<'a, N>
impl<'a, const N: usize> Unpin for Edit<'a, N>
impl<'a, const N: usize> UnsafeUnpin for Edit<'a, N>
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