#[repr(C)]pub enum Type {
Undefined,
Primitive(PrimitiveType),
Sequence(SequenceType),
User(UserType),
Pointer(PointerType),
}Expand description
The definition of a shape in accordance to rust reference:
Variants§
Undefined
Undefined type - used as default in ShapeBuilder.
Primitive(PrimitiveType)
Built-in primitive.
Sequence(SequenceType)
Sequence (array, slice).
User(UserType)
User-defined type (struct, enum, union).
Pointer(PointerType)
Pointer type (reference, raw, function pointer).
Implementations§
Source§impl Type
impl Type
Sourcepub const fn struct_builder(
kind: StructKind,
fields: &'static [Field],
) -> TypeStructBuilder
pub const fn struct_builder( kind: StructKind, fields: &'static [Field], ) -> TypeStructBuilder
Sourcepub const fn enum_builder(
enum_repr: EnumRepr,
variants: &'static [Variant],
) -> TypeEnumBuilder
pub const fn enum_builder( enum_repr: EnumRepr, variants: &'static [Variant], ) -> TypeEnumBuilder
Sourcepub const fn union_builder(fields: &'static [Field]) -> TypeUnionBuilder
pub const fn union_builder(fields: &'static [Field]) -> TypeUnionBuilder
Trait Implementations§
impl Copy for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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