pub enum MetaNode {
Tbaa(TbaaNode),
Plane(PlaneNode),
}Expand description
A node of the metadata graph.
Two kinds share the one table and the one numbering, because both of them are the compiler’s
interned type universe seen from a different side and a reader chasing a !3 should not have
to know which table it came out of.
Variants§
Tbaa(TbaaNode)
What aliasing needs: a type, and where it sits in the tree of types.
Plane(PlaneNode)
What the type plane needs: one entry in the vocabulary its bytes are written in.
Implementations§
Source§impl MetaNode
impl MetaNode
Sourcepub const fn tbaa(self) -> Option<TbaaNode>
pub const fn tbaa(self) -> Option<TbaaNode>
The aliasing node this is, or None when it is a plane entry.
Sourcepub const fn plane(self) -> Option<PlaneNode>
pub const fn plane(self) -> Option<PlaneNode>
The plane entry this is, or None when it is an aliasing node.
Sourcepub const fn parent(self) -> Option<Meta>
pub const fn parent(self) -> Option<Meta>
The node one level up, which a plane entry never has.
The tree is the aliasing tree and a plane entry is not in it. A plane entry that names a type points at a node of that tree, and that is a reference and not a parent: the walk that answers an aliasing query has no business leaving the tree it is walking.