pub struct FieldDefinition {
pub format: TableColumnFormat,
pub offset: usize,
pub name: String,
pub scale: Option<f64>,
pub zero: Option<f64>,
pub null: Option<i64>,
pub dimensions: Vec<usize>,
}Expand description
Everything the header says about one binary table column.
A column is more than its TFORMn type: TSCALn and TZEROn describe a linear
transform from the stored entry to the physical value it stands for, and
TNULLn names the stored entry that means “undefined”. decode applies all
three, so callers see physical values rather than raw ones.
Fields§
§format: TableColumnFormatTFORMn: this column’s type and repeat count.
offset: usizeByte offset of this column from the start of a row.
name: StringTTYPEn, or an empty string for a column that carries no name.
scale: Option<f64>TSCALn: the multiplier applied to a stored entry.
zero: Option<f64>TZEROn: the offset added after scaling.
null: Option<i64>TNULLn: the stored entry that marks an undefined value.
dimensions: Vec<usize>TDIMn: the shape this column’s entry has, fastest-varying axis first.
Empty for a column with no TDIMn card, which is a plain run of
TableColumnFormat::len elements. Value holds the elements flat
either way; this says how to fold them.
Implementations§
Trait Implementations§
Source§impl Clone for FieldDefinition
impl Clone for FieldDefinition
Source§fn clone(&self) -> FieldDefinition
fn clone(&self) -> FieldDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FieldDefinition
impl Debug for FieldDefinition
Source§impl PartialEq for FieldDefinition
impl PartialEq for FieldDefinition
impl StructuralPartialEq for FieldDefinition
Auto Trait Implementations§
impl Freeze for FieldDefinition
impl RefUnwindSafe for FieldDefinition
impl Send for FieldDefinition
impl Sync for FieldDefinition
impl Unpin for FieldDefinition
impl UnsafeUnpin for FieldDefinition
impl UnwindSafe for FieldDefinition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more