Struct ReadBufCursor
struct ReadBufCursor<'a> { ... }
The cursor part of a ReadBuf.
This is created by calling ReadBuf::unfilled().
Implementations
impl ReadBufCursor<'_>
unsafe fn as_mut(self: &mut Self) -> &mut [MaybeUninit<u8>]Access the unfilled part of the buffer.
Safety
The caller must not uninitialize any bytes that may have been initialized before.
unsafe fn advance(self: &mut Self, n: usize)Advance the
filledcursor bynbytes.Safety
The caller must take care that
nmore bytes have been initialized.fn remaining(self: &Self) -> usizeReturns the number of bytes that can be written from the current position until the end of the buffer is reached.
This value is equal to the length of the slice returned by `as_mut()``.
fn put_slice(self: &mut Self, src: &[u8])Transfer bytes into
self`` fromsrc` and advance the cursor by the number of bytes written.Panics
selfmust have enough remaining capacity to contain all ofsrc.
impl<'a> Debug for ReadBufCursor<'a>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<'a> Freeze for ReadBufCursor<'a>
impl<'a> RefUnwindSafe for ReadBufCursor<'a>
impl<'a> Send for ReadBufCursor<'a>
impl<'a> Sync for ReadBufCursor<'a>
impl<'a> Unpin for ReadBufCursor<'a>
impl<'a> UnsafeUnpin for ReadBufCursor<'a>
impl<'a> UnwindSafe for ReadBufCursor<'a>
impl<T> Any for ReadBufCursor<'a>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for ReadBufCursor<'a>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for ReadBufCursor<'a>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for ReadBufCursor<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for ReadBufCursor<'a>
impl<T> WithSubscriber for ReadBufCursor<'a>
impl<T, U> Into for ReadBufCursor<'a>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for ReadBufCursor<'a>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for ReadBufCursor<'a>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>