Trait hir_def::item_tree::ItemTreeNode[][src]

pub trait ItemTreeNode: Clone {
    type Source: AstNode + Into<Item>;
    fn ast_id(&self) -> FileAstId<Self::Source>;
fn lookup(tree: &ItemTree, index: Idx<Self>) -> &Self;
fn id_from_mod_item(mod_item: ModItem) -> Option<FileItemTreeId<Self>>;
fn id_to_mod_item(id: FileItemTreeId<Self>) -> ModItem; }
Expand description

Trait implemented by all item nodes in the item tree.

Associated Types

Required methods

Looks up an instance of Self in an item tree.

Downcasts a ModItem to a FileItemTreeId specific to this type.

Upcasts a FileItemTreeId to a generic ModItem.

Implementors