pub enum ItemKind<'hir> {
Mod(&'hir Module<'hir>),
Variable {
name: &'hir PathDef,
ty: Option<&'hir Type<'hir>>,
init: Option<&'hir Expression<'hir>>,
constness: Constness,
},
Function {
is_extern: bool,
is_variadic: bool,
name: &'hir PathDef,
params: &'hir [Param<'hir>],
ret_ty: &'hir Type<'hir>,
body: Option<&'hir [Statement<'hir>]>,
},
Struct {
name: &'hir PathDef,
fields: &'hir [Field<'hir>],
},
Use(&'hir UseItem<'hir>),
TypeAlias {
ty: &'hir Type<'hir>,
name: &'hir PathDef,
},
}Variants§
Mod(&'hir Module<'hir>)
Variable
Fields
§
init: Option<&'hir Expression<'hir>>Function
Fields
Struct
Use(&'hir UseItem<'hir>)
TypeAlias
Implementations§
Trait Implementations§
impl<'hir> Copy for ItemKind<'hir>
Auto Trait Implementations§
impl<'hir> Freeze for ItemKind<'hir>
impl<'hir> !RefUnwindSafe for ItemKind<'hir>
impl<'hir> !Send for ItemKind<'hir>
impl<'hir> !Sync for ItemKind<'hir>
impl<'hir> Unpin for ItemKind<'hir>
impl<'hir> !UnwindSafe for ItemKind<'hir>
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