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
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.