Skip to main content

FieldDesc

Struct FieldDesc 

Source
pub struct FieldDesc {
    pub name: &'static str,
    pub kind: FieldKind,
    pub opt_encoding: OptEncoding,
    pub word: u8,
    pub shift: u8,
    pub bits: u8,
    pub effects: u8,
    pub val_word: u8,
    pub no_inherit: bool,
    pub values: Option<&'static ValueSetDesc>,
}
Expand description

One field of a table row.

Fields§

§name: &'static str§kind: FieldKind§opt_encoding: OptEncoding

Optionality & bit-encoding strategy (Required for non-optional fields).

§word: u8

First word (for wide Option<T>, the word holding the 1-bit presence flag).

§shift: u8

Bit offset inside word (0 for whole-word fields).

§bits: u8

Bit width inside word (32 for whole-word fields; 64 for Str/64-bit; 1 for wide Option<T> presence bit).

§effects: u8

Effect class of the field’s words.

§val_word: u8

Value word for wide Option<T> fields (NO_VAL_WORD for all other fields).

§no_inherit: bool

True when marked #[no_inherit] on an inherited table (explicitly tracked, never inherited).

§values: Option<&'static ValueSetDesc>

Named values (enum variants / flag bits); not part of the schema hash.

Implementations§

Source§

impl FieldDesc

Source

pub const EMPTY: FieldDesc

Placeholder descriptor used to initialize fixed-size const arrays inside pack_table.

Trait Implementations§

Source§

impl Clone for FieldDesc

Source§

fn clone(&self) -> FieldDesc

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FieldDesc

Source§

impl Debug for FieldDesc

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for FieldDesc

Source§

impl PartialEq for FieldDesc

Source§

fn eq(&self, other: &FieldDesc) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FieldDesc

Auto Trait Implementations§

§

impl Forget for FieldDesc

§

impl Freeze for FieldDesc
where &'static str: Freeze, &'static ValueSetDesc: Freeze,

§

impl Move for FieldDesc

§

impl RefUnwindSafe for FieldDesc

§

impl Send for FieldDesc
where &'static str: Send, &'static ValueSetDesc: Send,

§

impl Sync for FieldDesc

§

impl Unpin for FieldDesc
where &'static str: Unpin, &'static ValueSetDesc: Unpin,

§

impl UnsafeUnpin for FieldDesc
where &'static str: UnsafeUnpin, &'static ValueSetDesc: UnsafeUnpin,

§

impl UnwindSafe for FieldDesc
where &'static str: UnwindSafe, &'static ValueSetDesc: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.