Trait Attribute

Source
pub trait Attribute: Default + Sized {
    type Error: Debug;

    const INDEX: usize;
    const BITS: u8;

    // Required methods
    fn from_bits(bits: u16) -> Result<Self, Self::Error>;
    fn into_bits(self) -> u16;
}

Required Associated Constants§

Source

const INDEX: usize

The unique index assigned to this attribute, used to index offset arrays.

Source

const BITS: u8

The number of bits required to represent this attribute.

Required Associated Types§

Source

type Error: Debug

The error that might occur when decoding the attribute from bits.

Required Methods§

Source

fn from_bits(bits: u16) -> Result<Self, Self::Error>

Source

fn into_bits(self) -> u16

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§