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

Returns a zero-initialized instance of the type.

Returns the object’s memory as a byte slice.

Returns the object’s memory as a mutable byte slice.

Returns a data view into the object’s memory.

Returns a mutable data view into the object’s memory.

Implementors