pub struct DataMut<'lt, Layout = Bytes> { /* private fields */ }Expand description
A mutable buffer with layout, not aligned to any particular boundary.
Implementations§
Source§impl<'lt, L> DataMut<'lt, L>
impl<'lt, L> DataMut<'lt, L>
Sourcepub fn with_layout_at(
data: &'lt mut [u8],
layout: L,
start: usize,
) -> Option<Self>where
L: Layout,
pub fn with_layout_at(
data: &'lt mut [u8],
layout: L,
start: usize,
) -> Option<Self>where
L: Layout,
Construct from an explicit layout.
This wraps an underlying mutable buffer which has image data of the indicated layout from
its start byte onwards.
Sourcepub fn as_source(&self) -> AsCopySource<'_, RangeEngine<L>>
pub fn as_source(&self) -> AsCopySource<'_, RangeEngine<L>>
An adapter reading from the data as one contiguous chunk.
See RangeEngine for more explanations.
Sourcepub fn as_target(&mut self) -> AsCopyTarget<'_, RangeEngine<L>>
pub fn as_target(&mut self) -> AsCopyTarget<'_, RangeEngine<L>>
An adapter writing to this buffer in one contiguous chunk.
See RangeEngine for more explanations.
Auto Trait Implementations§
impl<'lt, Layout = Bytes> !UnwindSafe for DataMut<'lt, Layout>
impl<'lt, Layout> Freeze for DataMut<'lt, Layout>where
Layout: Freeze,
impl<'lt, Layout> RefUnwindSafe for DataMut<'lt, Layout>where
Layout: RefUnwindSafe,
impl<'lt, Layout> Send for DataMut<'lt, Layout>where
Layout: Send,
impl<'lt, Layout> Sync for DataMut<'lt, Layout>where
Layout: Sync,
impl<'lt, Layout> Unpin for DataMut<'lt, Layout>where
Layout: Unpin,
impl<'lt, Layout> UnsafeUnpin for DataMut<'lt, Layout>where
Layout: UnsafeUnpin,
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