pub enum ItemKind {
Script(Vec<Stmt>),
Function(FunctionDef),
Struct(StructDef),
Enum(EnumDef),
Trait(TraitDef),
Impl(ImplBlock),
TypeAlias {
name: String,
type_params: Vec<String>,
target: Type,
},
Module {
name: String,
items: Vec<Item>,
},
Use {
public: bool,
tree: UseTree,
},
Const {
name: String,
ty: Type,
value: Expr,
},
Static {
name: String,
mutable: bool,
ty: Type,
value: Expr,
},
Extern {
abi: String,
items: Vec<ExternItem>,
},
}Variants§
Script(Vec<Stmt>)
Function(FunctionDef)
Struct(StructDef)
Enum(EnumDef)
Trait(TraitDef)
Impl(ImplBlock)
TypeAlias
Module
Use
Const
Static
Extern
Trait Implementations§
impl StructuralPartialEq for ItemKind
Auto Trait Implementations§
impl Freeze for ItemKind
impl RefUnwindSafe for ItemKind
impl Send for ItemKind
impl Sync for ItemKind
impl Unpin for ItemKind
impl UnwindSafe for ItemKind
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