Skip to main content

Fieldset

Trait Fieldset 

Source
pub unsafe trait Fieldset: Sized {
    const METADATA: FieldsetMetadata;
    const ZERO: Self;

    // Provided method
    fn as_slice_mut(&mut self) -> &mut [u8]  { ... }
}
Expand description

§Safety

Implers of this trait will get their memory changed through a byte slice. So make sure the type has a stable ABI and has no padding bits.

Required Associated Constants§

Source

const METADATA: FieldsetMetadata

Metadata describing some properties of the fieldset

Source

const ZERO: Self

Get a zero-initialized instance of the fieldset

Provided Methods§

Source

fn as_slice_mut(&mut self) -> &mut [u8]

Get the fieldset as a mutable slice

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Fieldset, const N: usize> Fieldset for [T; N]

Source§

const METADATA: FieldsetMetadata = T::METADATA

Source§

const ZERO: Self

Implementors§