Enum interoptopus::lang::c::CType [−][src]
pub enum CType { Primitive(PrimitiveType), Enum(EnumType), Opaque(OpaqueType), Composite(CompositeType), FnPointer(FnPointerType), ReadPointer(Box<CType>), ReadWritePointer(Box<CType>), Pattern(TypePattern), }
Expand description
A type that can exist at the FFI boundary.
Variants
Primitive(PrimitiveType)
Enum(EnumType)
Opaque(OpaqueType)
Composite(CompositeType)
FnPointer(FnPointerType)
Pattern(TypePattern)
Special patterns with primitives existing on C-level but special semantics. useful to higher level languages.
Implementations
Produces a name unique for that type with respect to this library.
The name here is supposed to uniquely determine a type relative to a Library
,
but it is not guaranteed to be C-compatible and may contain special characters
(e.g., *const u32
).
Backends should instead match on the CType
variant and determine a more appropriate
name on a case-by-case basis; including changing a name entirely.
Lists all other types this type refers to.
If this was a pointer type, tries to deref it and return the inner type.
Convenience method attempting to convert the contained type as a composite.
Convenience method attempting to convert the contained type as an opaque.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for CType
impl UnwindSafe for CType
Blanket Implementations
Mutably borrows from an owned value. Read more