Struct syntax::ast_map::Map[src]

pub struct Map {
    // some fields omitted
}

Methods

impl Map

fn get(&self, id: NodeId) -> Node

Retrieve the Node corresponding to id, failing if it cannot be found.

fn find(&self, id: NodeId) -> Option<Node>

Retrieve the Node corresponding to id, returning None if cannot be found.

fn get_parent(&self, id: NodeId) -> NodeId

Retrieve the parent NodeId for id, or id itself if no parent is registered in this map.

fn get_parent_did(&self, id: NodeId) -> DefId

fn get_foreign_abi(&self, id: NodeId) -> Abi

fn get_foreign_vis(&self, id: NodeId) -> Visibility

fn expect_item(&self, id: NodeId) -> Gc<Item>

fn expect_struct(&self, id: NodeId) -> Gc<StructDef>

fn expect_variant(&self, id: NodeId) -> P<Variant>

fn expect_foreign_item(&self, id: NodeId) -> Gc<ForeignItem>

fn get_path_elem(&self, id: NodeId) -> PathElem

fn with_path<T>(&self, id: NodeId, f: |PathElems| -> T) -> T

fn path_to_str(&self, id: NodeId) -> String

fn with_attrs<T>(&self, id: NodeId, f: |Option<&[Attribute]>| -> T) -> T

fn opt_span(&self, id: NodeId) -> Option<Span>

fn span(&self, id: NodeId) -> Span

fn node_to_str(&self, id: NodeId) -> String