pub enum ItemKind {
Import(Import),
ExternTarget(ExternTarget),
Config(ConfigEntry),
Struct(StructDecl),
Enum(EnumDecl),
Alias(AliasDecl),
IntrinsicType(IntrinsicTypeDecl),
Interface(InterfaceDecl),
Impl(ImplBlock),
Fn(FnDecl),
Test(TestDecl),
}Expand description
The kinds of declarations.
Variants§
Import(Import)
An entry of imports.
ExternTarget(ExternTarget)
A target block of extern: go { ... }.
Config(ConfigEntry)
A constant of config.
Struct(StructDecl)
struct
Enum(EnumDecl)
enum
Alias(AliasDecl)
type Name = Type
IntrinsicType(IntrinsicTypeDecl)
intrinsic type Name<T>: a built-in type declared in std (chapter 7, section 1).
Interface(InterfaceDecl)
interface
Impl(ImplBlock)
A block of impl.
Fn(FnDecl)
fn
Test(TestDecl)
test "name" { ... }
Implementations§
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 UnsafeUnpin 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