pub enum TableColumnFormat {
Show 16 variants
String(usize),
StringArray(usize, usize),
Boolean(usize),
Bit(usize),
U8(usize),
I8(usize),
U16(usize),
I16(usize),
U32(usize),
I32(usize),
I64(usize),
F32(usize),
F64(usize),
C32(usize),
M64(usize),
VariableLengthArray {
element: TableElementFormat,
descriptor: ArrayDescriptor,
max: usize,
},
}Expand description
The type and repeat count of one binary table column, from its TFORMn card.
The contained count is the TFORMn repeat count r, not a byte length; use
TableColumnFormat::bytes_len for the width of the field in the row.
Variants§
String(usize)
rA: one string of r characters.
StringArray(usize, usize)
rAw: r characters holding r / w substrings of w characters.
Boolean(usize)
rL: r logical values, one byte each.
Bit(usize)
rX: r bits, packed into ceil(r / 8) bytes.
U8(usize)
rB: r unsigned bytes.
I8(usize)
rS: r signed bytes.
U16(usize)
rU: r unsigned 16-bit integers.
I16(usize)
rI: r signed 16-bit integers.
U32(usize)
rV: r unsigned 32-bit integers.
I32(usize)
rJ: r signed 32-bit integers.
I64(usize)
rK: r signed 64-bit integers.
F32(usize)
rE: r single precision floats.
F64(usize)
rD: r double precision floats.
C32(usize)
rC: r single precision complex values, two f32 each.
M64(usize)
rM: r double precision complex values, two f64 each.
VariableLengthArray
rPt(max) or rQt(max): a variable length array.
The row itself holds only a descriptor saying how many values there are and where in the table’s heap they start; the values live in the heap, after the last row.
Fields
element: TableElementFormatThe type of the values in the heap.
descriptor: ArrayDescriptorWhich descriptor the row carries: P for 32-bit, Q for 64-bit.
Implementations§
Source§impl TableColumnFormat
impl TableColumnFormat
Sourcepub fn parse_into_value(&self, data: &[u8], heap: &[u8]) -> Result<Value>
pub fn parse_into_value(&self, data: &[u8], heap: &[u8]) -> Result<Value>
Decodes this column out of the front of data, which must be the
remainder of the row starting at this column’s offset.
heap is the table’s heap, which only a variable length array column
reads from; pass an empty slice for a table that has none.
Trait Implementations§
Source§impl Clone for TableColumnFormat
impl Clone for TableColumnFormat
Source§fn clone(&self) -> TableColumnFormat
fn clone(&self) -> TableColumnFormat
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TableColumnFormat
Source§impl Debug for TableColumnFormat
impl Debug for TableColumnFormat
Source§impl From<TableColumnFormat> for String
impl From<TableColumnFormat> for String
Source§fn from(value: TableColumnFormat) -> String
fn from(value: TableColumnFormat) -> String
Source§impl PartialEq for TableColumnFormat
impl PartialEq for TableColumnFormat
impl StructuralPartialEq for TableColumnFormat
Auto Trait Implementations§
impl Freeze for TableColumnFormat
impl RefUnwindSafe for TableColumnFormat
impl Send for TableColumnFormat
impl Sync for TableColumnFormat
impl Unpin for TableColumnFormat
impl UnsafeUnpin for TableColumnFormat
impl UnwindSafe for TableColumnFormat
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