pub enum TypeDef {
Primitive(PrimitiveDef),
Composite(CompositeDef),
Enum(EnumDef),
Set(SetDef),
}Expand description
Type definition variants.
Variants§
Primitive(PrimitiveDef)
Primitive type definition.
Composite(CompositeDef)
Composite type definition.
Enum(EnumDef)
Enum type definition.
Set(SetDef)
Set (bitfield) type definition.
Implementations§
Source§impl TypeDef
impl TypeDef
Sourcepub fn encoded_length(&self) -> usize
pub fn encoded_length(&self) -> usize
Returns the encoded size of the type in bytes.
Sourcepub const fn is_primitive(&self) -> bool
pub const fn is_primitive(&self) -> bool
Returns true if this is a primitive type.
Sourcepub const fn is_composite(&self) -> bool
pub const fn is_composite(&self) -> bool
Returns true if this is a composite type.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypeDef
impl RefUnwindSafe for TypeDef
impl Send for TypeDef
impl Sync for TypeDef
impl Unpin for TypeDef
impl UnwindSafe for TypeDef
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