#[non_exhaustive]pub enum Kind {
Show 15 variants
Type {
parameters: Hash,
},
Struct {
fields: Fields,
constructor: Option<Signature>,
parameters: Hash,
},
Variant {
enum_hash: Hash,
index: usize,
fields: Fields,
constructor: Option<Signature>,
},
Enum {
parameters: Hash,
},
Macro,
AttributeMacro,
Function {
associated: Option<AssociatedKind>,
trait_hash: Option<Hash>,
signature: Signature,
is_test: bool,
is_bench: bool,
parameters: Hash,
container: Option<Hash>,
parameter_types: Vec<Hash>,
},
Closure {
call: Call,
do_move: bool,
},
AsyncBlock {
call: Call,
do_move: bool,
},
Const,
ConstFn,
Import(Import),
Alias(Alias),
Module,
Trait,
}
Expand description
Compile-time metadata kind about a unit.
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.
Type
The type is completely opaque. We have no idea about what it is with the exception of it having a type hash.
Struct
Metadata about a struct.
Fields
Variant
Metadata about an empty variant.
Fields
Enum
An enum item.
Macro
A macro item.
AttributeMacro
An attribute macro item.
Function
A function declaration.
Fields
§
associated: Option<AssociatedKind>
The associated kind of the function, if it is an associated function.
Closure
A closure.
AsyncBlock
An async block.
Fields
Const
The constant expression.
ConstFn
A constant function.
Import(Import)
Purely an import.
Alias(Alias)
A re-export.
Module
A module.
Trait
A trait.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
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