pub enum DefKind {
Fn {
item_index: usize,
},
Sum {
item_index: usize,
variants: Vec<VariantDef>,
},
Record {
item_index: usize,
},
Const {
item_index: usize,
},
Trait {
item_index: usize,
},
Method {
item_index: usize,
method_index: usize,
owner: MethodOwner,
},
ExternFn {
item_index: usize,
fn_index: usize,
},
AssocType {
trait_def: DefId,
},
}Expand description
What kind of definition a DefId refers to.
Variants§
Fn
A function; the payload is the index of the item in File::items.
Sum
A sum type declaration with its variants.
Record
A record (struct) declaration.
Const
A constant; payload is the item index.
Trait
A trait declaration.
Method
A method: an ast::Function living inside an impl block, or a
trait’s default-method body. method_index selects it within the
owner (impl functions, or the trait’s provided items).
ExternFn
An extern function declaration (a C-ABI import, no Nova body).
fn_index selects the declaration within the extern block’s items.
AssocType
An associated type declared in a trait (type Item). Carries its
owning trait so a projection can be checked against the right trait
without a separate lookup table.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DefKind
impl RefUnwindSafe for DefKind
impl Send for DefKind
impl Sync for DefKind
impl Unpin for DefKind
impl UnsafeUnpin for DefKind
impl UnwindSafe for DefKind
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