Trait dataview::PodMethods
source · pub trait PodMethods {
fn zeroed() -> Self
where
Self: Sized;
fn as_bytes(&self) -> &[u8];
fn as_bytes_mut(&mut self) -> &mut [u8];
fn as_data_view(&self) -> &DataView;
fn as_data_view_mut(&mut self) -> &mut DataView;
}
Expand description
Helper trait to provide methods directly on the pod types.
Do not use this trait in any signatures, use Pod
directly instead.
There’s a blanket impl that provides these methods for all pod types.
Required Methods
sourcefn as_bytes_mut(&mut self) -> &mut [u8]
fn as_bytes_mut(&mut self) -> &mut [u8]
Returns the object’s memory as a mutable byte slice.
sourcefn as_data_view(&self) -> &DataView
fn as_data_view(&self) -> &DataView
Returns a data view into the object’s memory.
sourcefn as_data_view_mut(&mut self) -> &mut DataView
fn as_data_view_mut(&mut self) -> &mut DataView
Returns a mutable data view into the object’s memory.