pub struct DataType<'types> {
pub meta: &'types MetaType,
pub derive: ConfigValue<Vec<Ident>>,
pub variant: DataTypeVariant<'types>,
}
Expand description
Represents a fully evaluated and enriched type definition used for rendering.
A DataType
wraps a MetaType
and augments it with generator-evaluated
context required by the rendering phase. This avoids duplicating logic in
multiple renderers by providing a preprocessed, render-ready structure.
Each DataType
includes both a reference to the original meta type and
a DataTypeVariant
which contains the specific generator output based
on the kind of the underlying type.
Fields§
§meta: &'types MetaType
Underlying meta type this data type contains additional information for.
derive: ConfigValue<Vec<Ident>>
Defines traits to derive the type from.
variant: DataTypeVariant<'types>
The variant of the data type.
Methods from Deref<Target = MetaType>§
Sourcepub fn form(&self) -> FormChoiceType
pub fn form(&self) -> FormChoiceType
Returns the form element of this type should have.
Trait Implementations§
Auto Trait Implementations§
impl<'types> Freeze for DataType<'types>
impl<'types> !RefUnwindSafe for DataType<'types>
impl<'types> !Send for DataType<'types>
impl<'types> !Sync for DataType<'types>
impl<'types> Unpin for DataType<'types>
impl<'types> !UnwindSafe for DataType<'types>
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
Mutably borrows from an owned value. Read more