pub struct BufferSlice<B> { /* private fields */ }Expand description
An owned view into initialized storage. Dropping it drops its owner; into_inner recovers the complete buffer after an operation returns it.
Implementations§
Source§impl<B: IoBuf> BufferSlice<B>
impl<B: IoBuf> BufferSlice<B>
pub fn into_inner(self) -> B
Trait Implementations§
Source§impl<B: Clone> Clone for BufferSlice<B>
impl<B: Clone> Clone for BufferSlice<B>
Source§impl<B: Debug> Debug for BufferSlice<B>
impl<B: Debug> Debug for BufferSlice<B>
Source§impl<B: IoBuf> IoBuf for BufferSlice<B>
impl<B: IoBuf> IoBuf for BufferSlice<B>
Source§fn slice(self, range: impl RangeBounds<usize>) -> BufferSlice<Self>where
Self: Sized,
fn slice(self, range: impl RangeBounds<usize>) -> BufferSlice<Self>where
Self: Sized,
Limit an operation to an owned range without copying its bytes. Panics if the range is outside the initialized buffer.
impl<B: IoBufMut> IoBufMut for BufferSlice<B>
Auto Trait Implementations§
impl<B> Freeze for BufferSlice<B>where
B: Freeze,
impl<B> RefUnwindSafe for BufferSlice<B>where
B: RefUnwindSafe,
impl<B> Send for BufferSlice<B>where
B: Send,
impl<B> Sync for BufferSlice<B>where
B: Sync,
impl<B> Unpin for BufferSlice<B>where
B: Unpin,
impl<B> UnsafeUnpin for BufferSlice<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for BufferSlice<B>where
B: UnwindSafe,
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