Skip to main content

TreeSource

Trait TreeSource 

Source
pub trait TreeSource {
    // Required method
    fn tree_of(&self, id: TreeId) -> Option<&NodeTree<Flm>>;
}
Expand description

A set of trees looked up by TreeId, in which the node references of a table are resolved while the table is projected.

Three implementations are provided: a document’s parsed trees (DocContent), a run’s frozen trees (Run, the trees its tables were computed over), and a map from tree id to tree that a test assembles.

The id of a synthesized value (a small tree a stage builds) is found in none of them, because such a tree exists only inside the stage invocation that built it (see crate::model::addr). A table holding one therefore projects the tree inline, through ProjectCx::tree, and never by its id.

Required Methods§

Source

fn tree_of(&self, id: TreeId) -> Option<&NodeTree<Flm>>

Returns the tree with this id, or None when this set does not hold it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TreeSource for BTreeMap<TreeId, Arc<NodeTree<Flm>>>

Implementors§