Skip to main content

FieldModel

Struct FieldModel 

Source
pub struct FieldModel<'a> {
    pub desc: &'a FieldDesc,
    pub bits: u8,
    pub val_word: u8,
    pub explicit_bit: u8,
    pub inherits: bool,
    pub resource_kind: Option<U64Split>,
}
Expand description

One field as every host FieldSpec spells it.

Fields§

§desc: &'a FieldDesc§bits: u8

Host bit width: a two-word field (Str, 64-bit) is bits = 64 in Rust but (shift 0, bits 32) on every host (the second word is implied by the kind).

§val_word: u8

OptEncoding::WideBit value word (word / shift hold the presence bit), else NO_VAL_WORD.

§explicit_bit: u8

Bit of the field in an inherited table’s explicit mask (word 0), else NO_VAL_WORD.

§inherits: bool

An unset value resolves from the parent row (inherited table, not #[no_inherit]).

§resource_kind: Option<U64Split>

FlatResource::KIND of a Resource field.

Implementations§

Source§

impl FieldModel<'_>

Source

pub fn name(&self) -> &str

Trait Implementations§

Source§

impl<'a> Debug for FieldModel<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Forget for FieldModel<'a>

§

impl<'a> Freeze for FieldModel<'a>
where &'a FieldDesc: Freeze,

§

impl<'a> Move for FieldModel<'a>

§

impl<'a> RefUnwindSafe for FieldModel<'a>

§

impl<'a> Send for FieldModel<'a>
where &'a FieldDesc: Send,

§

impl<'a> Sync for FieldModel<'a>

§

impl<'a> Unpin for FieldModel<'a>
where &'a FieldDesc: Unpin,

§

impl<'a> UnsafeUnpin for FieldModel<'a>

§

impl<'a> UnwindSafe for FieldModel<'a>
where &'a FieldDesc: 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.