pub enum Data {
Primitive,
Struct(Fields),
Enum(Variants),
Unit,
}
Expand description
Information about data contained within type
Data::Primitive
is special case for fundamental rust types.
This crate assumes that your types will be built using those.
Variants§
Primitive
Fundamental type, which doesn’t have any fields. You can’t define types with this kind of data
Struct(Fields)
Struct-like, can be tuple struct or default struct
Enum(Variants)
Variants of this enum
Unit
Unit type, which means that type doesn’t have any fields.
Note: that this differs from Data::Primitive
semantic meaning: you can define types which hold this data
Trait Implementations§
impl Eq for Data
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
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