pub enum TypeClass {
Show 15 variants
Array,
BareFn,
Group,
ImplTrait,
Infer,
Macro,
Never,
Paren,
Path,
Ptr,
Reference,
Slice,
TraitObject,
Tuple,
Any,
}
Expand description
Constrains for the possible types that a Rust value could have.
Variants§
Array
A fixed size array type: [T; n]
.
BareFn
A bare function type: fn(usize) -> bool
.
Group
A type contained within invisible delimiters.
ImplTrait
An impl Bound1 + Bound2 + Bound3
type where Bound
is a trait or
a lifetime.
Infer
Indication that a type should be inferred by the compiler: _
.
Macro
A macro in the type position.
Never
The never type: !
.
Paren
A parenthesized type equivalent to the inner type.
Path
A path like std::slice::Iter
, optionally qualified with a
self-type as in <Vec<T> as SomeTrait>::Associated
.
Ptr
A raw pointer type: *const T
or *mut T
.
Reference
A reference type: &'a T
or &'a mut T
.
Slice
A dynamically sized slice type: [T]
.
TraitObject
A trait object type Bound1 + Bound2 + Bound3
where Bound
is a
trait or a lifetime.
Tuple
A tuple type: (A, B, C, String)
.
Any
Tokens in type position not interpreted by Syn.
Implementations§
Trait Implementations§
Source§impl From<TypeClass> for ValueClass
impl From<TypeClass> for ValueClass
Source§impl Ord for TypeClass
impl Ord for TypeClass
Source§impl PartialOrd for TypeClass
impl PartialOrd for TypeClass
impl Copy for TypeClass
impl Eq for TypeClass
impl StructuralPartialEq for TypeClass
Auto Trait Implementations§
impl Freeze for TypeClass
impl RefUnwindSafe for TypeClass
impl Send for TypeClass
impl Sync for TypeClass
impl Unpin for TypeClass
impl UnwindSafe for TypeClass
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Array
: 0 bytesBareFn
: 0 bytesGroup
: 0 bytesImplTrait
: 0 bytesInfer
: 0 bytesMacro
: 0 bytesNever
: 0 bytesParen
: 0 bytesPath
: 0 bytesPtr
: 0 bytesReference
: 0 bytesSlice
: 0 bytesTraitObject
: 0 bytesTuple
: 0 bytesAny
: 0 bytes