Module item

Source

Modules§

parsing 🔒
printing 🔒

Structs§

ForeignItemFn
A foreign function in an extern block.
ForeignItemMacro
A macro invocation within an extern block.
ForeignItemStatic
A foreign static item in an extern block: static ext: u8.
ForeignItemType
A foreign type in an extern block: type void.
ImplItemConst
An associated constant within an impl block.
ImplItemFn
An associated function within an impl block.
ImplItemMacro
A macro invocation within an impl block.
ImplItemType
An associated type within an impl block.
ItemConst
A constant item: const MAX: u16 = 65535.
ItemEnum
An enum definition: enum Foo<A, B> { A(A), B(B) }.
ItemExternCrate
An extern crate item: extern crate serde.
ItemFn
A free-standing function: fn process(n: usize) -> Result<()> { ... }.
ItemForeignMod
A block of foreign items: extern "C" { ... }.
ItemImpl
An impl block providing trait or associated items: impl<A> Trait for Data<A> { ... }.
ItemMacro
A macro invocation, which includes macro_rules! definitions.
ItemMod
A module or module declaration: mod m or mod m { ... }.
ItemStatic
A static item: static BIKE: Shed = Shed(42).
ItemStruct
A struct definition: struct Foo<A> { x: A }.
ItemTrait
A trait definition: pub trait Iterator { ... }.
ItemTraitAlias
A trait alias: pub trait SharableIterator = Iterator + Sync.
ItemType
A type alias: type Result<T> = std::result::Result<T, MyError>.
ItemUnion
A union definition: union Foo<A, B> { x: A, y: B }.
ItemUse
A use declaration: use std::collections::HashMap.
Receiver
The self argument of an associated method.
Signature
A function signature in a trait or implementation: unsafe fn initialize(&self).
TraitItemConst
An associated constant within the definition of a trait.
TraitItemFn
An associated function within the definition of a trait.
TraitItemMacro
A macro invocation within the definition of a trait.
TraitItemType
An associated type within the definition of a trait.
UseGlob
A glob import in a use item: *.
UseGroup
A braced group of imports in a use item: {A, B, C}.
UseName
An identifier imported by a use item: HashMap.
UsePath
A path prefix of imports in a use item: std::....
UseRename
An renamed identifier imported by a use item: HashMap as Map.
Variadic
The variadic argument of a foreign function.

Enums§

FnArg
An argument in a function signature: the n: usize in fn f(n: usize).
ForeignItem
An item within an extern block.
ImplItem
An item within an impl block.
ImplRestriction
Unused, but reserved for RFC 3323 restrictions.
Item
Things that can appear directly inside of a module or scope.
StaticMutability
The mutability of an Item::Static or ForeignItem::Static.
TraitItem
An item declaration within the definition of a trait.
UseTree
A suffix of an import tree in a use item: Type as Renamed or *.