pub enum Type {
Show 15 variants
Never,
Bool,
Int(IntWidth, Signedness),
Float(FloatWidth),
Pointer(Mutability, Lifetime, Box<Self>),
Reference(Mutability, Lifetime, Box<Self>),
Array(Box<Self>, ConstExpression),
Vector(Box<Self>, ConstExpression),
Slice(Mutability, Box<Self>),
Tuple(Vec<Self>),
Enum(Vec<Self>),
Named(String, Vec<GenericArgument>),
Function(FunctionSignature),
Generic(String),
Inferred,
}Expand description
A Ty type.
Variants§
Never
The never/bottom type (diverges).
Bool
Boolean type.
Int(IntWidth, Signedness)
Integer type with width and signedness.
Float(FloatWidth)
Floating-point type with width.
Pointer(Mutability, Lifetime, Box<Self>)
Raw pointer with mutability, lifetime, and pointee type.
Reference(Mutability, Lifetime, Box<Self>)
Reference with mutability, lifetime, and referent type.
Array(Box<Self>, ConstExpression)
Fixed-size array ([T; N]).
Vector(Box<Self>, ConstExpression)
SIMD vector type.
Slice(Mutability, Box<Self>)
Slice type with mutability.
Tuple(Vec<Self>)
Product type (tuple/struct).
Enum(Vec<Self>)
Sum type (enum/variant).
Named(String, Vec<GenericArgument>)
Named user-defined type with generic arguments.
Function(FunctionSignature)
Function pointer type.
Generic(String)
Unresolved generic type parameter reference.
Inferred
Type to be inferred.
Implementations§
Trait Implementations§
impl Eq for Type
impl StructuralPartialEq 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 UnsafeUnpin 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