Skip to main content

SubField

Struct SubField 

Source
pub struct SubField {
    pub name: &'static str,
    pub type_name: &'static str,
    pub conditions: &'static [(&'static str, &'static str)],
    pub components: &'static [Component],
    pub scale: Option<f64>,
    pub offset: Option<f64>,
    pub units: Option<&'static str>,
}
Expand description

One alternative interpretation of a parent field.

Fields§

§name: &'static str

Snake-case canonical name from Profile.xlsx.

§type_name: &'static str

Type reference for this SubField.

§conditions: &'static [(&'static str, &'static str)]

Conditions: parallel (ref_field_name, ref_value) pairs. The SubField applies when any condition matches (i.e. ref-field decoded value equals one of the listed values, after Profile-level type resolution).

§components: &'static [Component]

Components to unpack when this SubField is selected (empty for most SubFields).

§scale: Option<f64>

Scale factor.

§offset: Option<f64>

Offset.

§units: Option<&'static str>

Display unit.

Trait Implementations§

Source§

impl Debug for SubField

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.