Trait hir_def::item_tree::ItemTreeNode
source · pub trait ItemTreeNode: Clone {
type Source: AstIdNode;
// Required methods
fn ast_id(&self) -> FileAstId<Self::Source>;
fn lookup(tree: &ItemTree, index: Idx<Self>) -> &Self;
fn attr_owner(id: FileItemTreeId<Self>) -> AttrOwner;
}
Expand description
Trait implemented by all nodes in the item tree.
Required Associated Types§
Required Methods§
fn ast_id(&self) -> FileAstId<Self::Source>
sourcefn lookup(tree: &ItemTree, index: Idx<Self>) -> &Self
fn lookup(tree: &ItemTree, index: Idx<Self>) -> &Self
Looks up an instance of Self
in an item tree.
fn attr_owner(id: FileItemTreeId<Self>) -> AttrOwner
Object Safety§
This trait is not object safe.