Trait wlan_common::mac::IntoBytesExt

source ·
pub trait IntoBytesExt: IntoBytes + KnownLayout + Immutable + Sized {
    // Provided method
    fn as_bytes_ref(&self) -> Ref<&[u8], Self> { ... }
}

Provided Methods§

source

fn as_bytes_ref(&self) -> Ref<&[u8], Self>

Gets a byte slice reference from a reference to Self.

This is essentially the reverse of Ref constructors and can be used to construct Ref fields in zerocopy types from a reference to Self instead of bytes.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> IntoBytesExt for T
where T: IntoBytes + Immutable + KnownLayout + Sized,