hir_def::item_tree

Trait 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§

Source

type Source: AstIdNode

Required Methods§

Source

fn ast_id(&self) -> FileAstId<Self::Source>

Source

fn lookup(tree: &ItemTree, index: Idx<Self>) -> &Self

Looks up an instance of Self in an item tree.

Source

fn attr_owner(id: FileItemTreeId<Self>) -> AttrOwner

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§