[][src]Trait maligned::AsBytes

pub unsafe trait AsBytes: SealedAsBytes + Sized {
#[must_use]    fn as_bytes(&self) -> &[u8];
}

Trait that allows reinterpretation of a struct as bytes. This is unsafe since the returned slice must always have a length equal to the size of the struct and because every bit pattern within the structs size must be valid.

Required methods

#[must_use]fn as_bytes(&self) -> &[u8]

Turn a reference to self to a byte slice.

Loading content...

Implementations on Foreign Types

impl<T: AsBytes> AsBytes for Vec<T>[src]

Loading content...

Implementors

impl AsBytes for A1024[src]

impl AsBytes for A128[src]

impl AsBytes for A131072[src]

impl AsBytes for A16[src]

impl AsBytes for A16384[src]

impl AsBytes for A2[src]

impl AsBytes for A2048[src]

impl AsBytes for A256[src]

impl AsBytes for A32[src]

impl AsBytes for A32768[src]

impl AsBytes for A4[src]

impl AsBytes for A4096[src]

impl AsBytes for A512[src]

impl AsBytes for A64[src]

impl AsBytes for A65536[src]

impl AsBytes for A8[src]

impl AsBytes for A8192[src]

impl<'_, T: AsBytes> AsBytes for &'_ [T][src]

impl<'_, T: AsBytes> AsBytes for &'_ mut [T][src]

Loading content...