pub(crate) struct FieldAttrs {
pub(crate) skip: bool,
pub(crate) rename: Option<String>,
pub(crate) as_list: bool,
pub(crate) as_factor: bool,
expand: bool,
pub(crate) width: Option<usize>,
}Expand description
Parsed field-level #[dataframe(...)] attributes.
These attributes control how individual struct/enum fields map to DataFrame columns.
Mutually exclusive combinations (as_list + expand, as_list + width,
as_factor + as_list, as_factor + expand, as_factor + width) are
rejected during parsing.
Fields§
§skip: bool#[dataframe(skip)] – omit this field from the DataFrame entirely.
rename: Option<String>#[dataframe(rename = "col")] – use a custom column name instead of the field name.
as_list: bool#[dataframe(as_list)] – keep a collection field as a single R list column
(suppresses automatic expansion into suffixed columns).
as_factor: bool#[dataframe(as_factor)] – treat a unit-only inner enum field as an R factor column.
Only valid on bare-ident enum types (no generic parameters). The inner enum must be
unit-only (#[derive(DataFrameRow)] emits IntoR and IntoR for Vec<Option<Self>>).
expand: bool#[dataframe(expand)] or #[dataframe(unnest)] – explicitly expand a
collection field into multiple suffixed columns.
width: Option<usize>#[dataframe(width = N)] – pin the expansion width for Vec<T>, Box<[T]>,
or &[T] fields. Rows shorter than N get None for missing positions.
Trait Implementations§
Source§impl Default for FieldAttrs
impl Default for FieldAttrs
Source§fn default() -> FieldAttrs
fn default() -> FieldAttrs
Auto Trait Implementations§
impl Freeze for FieldAttrs
impl RefUnwindSafe for FieldAttrs
impl Send for FieldAttrs
impl Sync for FieldAttrs
impl Unpin for FieldAttrs
impl UnsafeUnpin for FieldAttrs
impl UnwindSafe for FieldAttrs
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: 48 bytes