pub struct SubstTableExt {
pub mappings: Vec<(String, TreeNodeExt)>,
}Expand description
A substitution table for tree nodes.
Fields§
§mappings: Vec<(String, TreeNodeExt)>Mappings from variable name to replacement node
Implementations§
Source§impl SubstTableExt
impl SubstTableExt
Sourcepub fn add(&mut self, var: &str, replacement: TreeNodeExt)
pub fn add(&mut self, var: &str, replacement: TreeNodeExt)
Add a mapping.
Sourcepub fn apply(&self, node: &TreeNodeExt) -> TreeNodeExt
pub fn apply(&self, node: &TreeNodeExt) -> TreeNodeExt
Apply the substitution to a tree node.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubstTableExt
impl RefUnwindSafe for SubstTableExt
impl Send for SubstTableExt
impl Sync for SubstTableExt
impl Unpin for SubstTableExt
impl UnsafeUnpin for SubstTableExt
impl UnwindSafe for SubstTableExt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more