Trait musli_zerocopy::buf::LoadMut

source ·
pub trait LoadMut: Load {
    // Required method
    fn load_mut<'buf>(
        &self,
        buf: &'buf mut Buf
    ) -> Result<&'buf mut Self::Target, Error>;
}
Expand description

Trait used for loading any kind of reference through Buf::load_mut.

This is a high level trait which can be implemented safely, typically it’s used to build facade types for when you want some type to behave like a different type, but have a different layout.

See the module level documentation for an example.

Required Methods§

source

fn load_mut<'buf>( &self, buf: &'buf mut Buf ) -> Result<&'buf mut Self::Target, Error>

Validate the value.

Implementors§

source§

impl<E: ByteOrder, O: Size> LoadMut for Ref<str, E, O>

source§

impl<T, E: ByteOrder, O: Size> LoadMut for Ref<[T], E, O>
where T: ZeroCopy,

source§

impl<T, E: ByteOrder, O: Size> LoadMut for Ref<T, E, O>
where T: ZeroCopy,