pub enum Item {
Function(Function),
Struct(StructDecl),
Enum(EnumDecl),
Impl(ImplBlock),
Mod(ModDecl),
Use(UseDecl),
}Expand description
A top-level declaration (spec 4.1, 2.2, 2.5): a function, a struct, an
enum, an impl block, or a module declaration. mod name; only
declares a submodule; resolving it to the submodule’s own file and items
is the compiler’s resolve module’s job.
Variants§
Trait Implementations§
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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