pub enum TypeBody {
Wrapped(FieldType),
Checked(NewtypeRule),
Map {
key: FieldType,
value: ValueSchema,
max_items: u32,
},
Set {
item: FieldType,
max_items: u32,
},
Record(&'static [FieldSchema]),
Enum(&'static [VariantSchema]),
}Expand description
A compiled named type; record/enum members use canonical name order.
Variants§
Wrapped(FieldType)
Named wrapper around a primitive or a bounded ordered list.
Checked(NewtypeRule)
Scalar wrapper whose values must satisfy the declared rule.
Map
Canonical map with scalar/unit-enum keys and arbitrary admitted value shapes.
Fields
§
value: ValueSchemaValue type and optionality, independent of map presence.
Set
Canonical scalar/unit-enum set. Stored elements must be strictly increasing.
Fields
Record(&'static [FieldSchema])
Stored fields; nested entity references are not supported.
Enum(&'static [VariantSchema])
Named alternatives, each with at most one typed payload.
Trait Implementations§
impl Eq for TypeBody
impl StructuralPartialEq for TypeBody
Auto Trait Implementations§
impl Forget for TypeBody
impl Freeze for TypeBodywhere
&'static FieldType: Freeze,
&'static str: Freeze,
&'static [FieldSchema]: Freeze,
&'static [VariantSchema]: Freeze,
impl Move for TypeBody
impl RefUnwindSafe for TypeBody
impl Send for TypeBodywhere
&'static FieldType: Send,
&'static str: Send,
&'static [FieldSchema]: Send,
&'static [VariantSchema]: Send,
impl Sync for TypeBody
impl Unpin for TypeBodywhere
&'static FieldType: Unpin,
&'static str: Unpin,
&'static [FieldSchema]: Unpin,
&'static [VariantSchema]: Unpin,
impl UnsafeUnpin for TypeBodywhere
&'static FieldType: UnsafeUnpin,
&'static str: UnsafeUnpin,
&'static [FieldSchema]: UnsafeUnpin,
&'static [VariantSchema]: UnsafeUnpin,
impl UnwindSafe for TypeBodywhere
&'static FieldType: UnwindSafe,
&'static str: UnwindSafe,
&'static [FieldSchema]: UnwindSafe,
&'static [VariantSchema]: UnwindSafe,
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