Struct rustc::hir::Crate
[−]
[src]
pub struct Crate { pub module: Mod, pub attrs: HirVec<Attribute>, pub config: CrateConfig, pub span: Span, pub exported_macros: HirVec<MacroDef>, pub items: BTreeMap<NodeId, Item>, }
Unstable (
rustc_private
)Fields
module: Mod
Unstable (
rustc_private
)attrs: HirVec<Attribute>
Unstable (
rustc_private
)config: CrateConfig
Unstable (
rustc_private
)span: Span
Unstable (
rustc_private
)exported_macros: HirVec<MacroDef>
Unstable (
rustc_private
)items: BTreeMap<NodeId, Item>
Unstable (
rustc_private
)Methods
impl Crate
[src]
fn item(&self, id: NodeId) -> &Item
fn visit_all_items<'hir, V>(&'hir self, visitor: &mut V) where V: Visitor<'hir>
Unstable (
rustc_private
)Visits all items in the crate in some determinstic (but unspecified) order. If you just need to process every item, but don't care about nesting, this method is the best choice.
If you do care about nesting -- usually because your algorithm
follows lexical scoping rules -- then you want a different
approach. You should override visit_nested_item
in your
visitor and then call intravisit::walk_crate
instead.
Trait Implementations
Derived Implementations
impl Debug for Crate
[src]
impl Decodable for Crate
[src]
impl Encodable for Crate
[src]
impl Eq for Crate
[src]
impl PartialEq for Crate
[src]
fn eq(&self, __arg_0: &Crate) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Crate) -> bool
This method tests for !=
.
impl Clone for Crate
[src]
fn clone(&self) -> Crate
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more