pub(crate) enum FieldTypeKind<'a> {
Scalar,
FixedArray(&'a Type, usize),
VariableVec(&'a Type),
BoxedSlice(&'a Type),
BorrowedSlice(&'a Type),
Map {
key_ty: &'a Type,
val_ty: &'a Type,
},
Struct {
inner_ty: &'a Type,
},
}Expand description
Classification of a field type for DataFrame column expansion.
Used to decide whether a field maps to a single column or should be
expanded into multiple suffixed columns (e.g., coords_1, coords_2).
Variants§
Scalar
Single column (most types). No expansion.
FixedArray(&'a Type, usize)
[T; N] – fixed-size array, expands to N columns at compile time.
Contains the element type and array length.
VariableVec(&'a Type)
Vec<T> – variable length, needs width attribute or expand for expansion.
Contains the element type.
BoxedSlice(&'a Type)
Box<[T]> – owned slice, treated like Vec<T> for expansion purposes.
Contains the element type.
BorrowedSlice(&'a Type)
&[T] – borrowed slice, treated like Vec<T> for expansion purposes.
Contains the element type.
Map
HashMap<K, V> or BTreeMap<K, V> – expands to two parallel list-columns:
<field>_keys and <field>_values. Key order follows the map’s own iteration
order: BTreeMap yields sorted keys, HashMap yields non-deterministic order.
Struct
A struct-typed field whose inner type implements DataFrameRow.
Flattened into <field>_<inner_col> prefixed columns by default.
A compile-time assertion against ::miniextendr_api::markers::DataFrameRow
is emitted so rustc gives a clear error when the inner type is missing the
derive.
Suppressed by #[dataframe(as_list)] — with as_list the field becomes
a Scalar and uses the ordinary single-column codegen path.
Auto Trait Implementations§
impl<'a> Freeze for FieldTypeKind<'a>
impl<'a> RefUnwindSafe for FieldTypeKind<'a>
impl<'a> !Send for FieldTypeKind<'a>
impl<'a> !Sync for FieldTypeKind<'a>
impl<'a> Unpin for FieldTypeKind<'a>
impl<'a> UnsafeUnpin for FieldTypeKind<'a>
impl<'a> UnwindSafe for FieldTypeKind<'a>
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> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Scalar: 0 bytesFixedArray: 16 bytesVariableVec: 8 bytesBoxedSlice: 8 bytesBorrowedSlice: 8 bytesMap: 16 bytesStruct: 8 bytes