Skip to main content

FieldMetadata

Struct FieldMetadata 

Source
pub struct FieldMetadata<Base: Unsigned> {
    pub name: &'static str,
    pub high_bit: u32,
    pub low_bit: u32,
    pub default: Base,
}
Expand description

The metadata of a (non-reserved) bitfield.

The iterator of a layout! type will have an associated item type of (Base, &'static FieldMetadata<Base>).

Fields§

§name: &'static str

The name of the bitfield.

§high_bit: u32

The high bit of the bitfield.

§low_bit: u32

The low bit of the bitfield.

§default: Base

The default value of the bitfield.

Trait Implementations§

Source§

impl<Base: Debug + Unsigned> Debug for FieldMetadata<Base>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Base> Freeze for FieldMetadata<Base>
where Base: Freeze,

§

impl<Base> RefUnwindSafe for FieldMetadata<Base>
where Base: RefUnwindSafe,

§

impl<Base> Send for FieldMetadata<Base>
where Base: Send,

§

impl<Base> Sync for FieldMetadata<Base>
where Base: Sync,

§

impl<Base> Unpin for FieldMetadata<Base>
where Base: Unpin,

§

impl<Base> UnsafeUnpin for FieldMetadata<Base>
where Base: UnsafeUnpin,

§

impl<Base> UnwindSafe for FieldMetadata<Base>
where Base: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.