#[non_exhaustive]#[repr(C)]pub enum Type<'shape> {
Primitive(PrimitiveType),
Sequence(SequenceType<'shape>),
User(UserType<'shape>),
Pointer(PointerType<'shape>),
}Expand description
The definition of a shape in accordance to rust reference:
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Primitive(PrimitiveType)
Built-in primitive.
Sequence(SequenceType<'shape>)
Sequence (tuple, array, slice).
User(UserType<'shape>)
User-defined type (struct, enum, union).
Pointer(PointerType<'shape>)
Pointer type (reference, raw, function pointer).
Trait Implementations§
impl<'shape> Copy for Type<'shape>
Auto Trait Implementations§
impl<'shape> Freeze for Type<'shape>
impl<'shape> RefUnwindSafe for Type<'shape>
impl<'shape> Send for Type<'shape>
impl<'shape> Sync for Type<'shape>
impl<'shape> Unpin for Type<'shape>
impl<'shape> UnwindSafe for Type<'shape>
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