pub struct OutputSlice<'a> {
pub obuf: &'a mut [u8],
pub pos: usize,
}Expand description
A non-allocating append sink backed by a caller-provided slice.
Its logical view is the prefix written so far (given by pos).
Fields§
§obuf: &'a mut [u8]§pos: usizeImplementations§
Source§impl<'a> OutputSlice<'a>
impl<'a> OutputSlice<'a>
Sourcepub open spec fn final_destination(&self) -> Seq<u8>
pub open spec fn final_destination(&self) -> Seq<u8>
{ final(self.obuf)@ }The prophetic final contents of the caller-provided backing slice.
Trait Implementations§
Source§impl OutputBuf for OutputSlice<'_>
impl OutputBuf for OutputSlice<'_>
Source§proof fn lemma_fits_mono(&self, shorter: nat, longer: nat)
proof fn lemma_fits_mono(&self, shorter: nat, longer: nat)
Source§open spec fn same_destination(&self, other: &Self) -> bool
open spec fn same_destination(&self, other: &Self) -> bool
{ self.final_destination() == other.final_destination() }Source§proof fn lemma_same_destination_reflexive(&self)
proof fn lemma_same_destination_reflexive(&self)
Source§proof fn lemma_same_destination_transitive(&self, _middle: &Self, _last: &Self)
proof fn lemma_same_destination_transitive(&self, _middle: &Self, _last: &Self)
Source§exec fn write_byte(&mut self, byte: u8)
exec fn write_byte(&mut self, byte: u8)
Source§exec fn write_bytes(&mut self, bytes: &[u8])
exec fn write_bytes(&mut self, bytes: &[u8])
Auto Trait Implementations§
impl<'a> Freeze for OutputSlice<'a>
impl<'a> RefUnwindSafe for OutputSlice<'a>
impl<'a> Send for OutputSlice<'a>
impl<'a> Sync for OutputSlice<'a>
impl<'a> Unpin for OutputSlice<'a>
impl<'a> UnsafeUnpin for OutputSlice<'a>
impl<'a> !UnwindSafe for OutputSlice<'a>
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