Struct geo_aid::script::unroll::HierarchyNode
source · pub struct HierarchyNode<T: Node> {
pub root: Box<T>,
pub children: Vec<Box<dyn Node>>,
pub associated: Option<Box<dyn BuildAssociated<T>>>,
pub associated_data: HashMap<&'static str, AssociatedData>,
}
Expand description
Contains a root node, apart from its children. Simulates a hierarchy.
Fields§
§root: Box<T>
§children: Vec<Box<dyn Node>>
§associated: Option<Box<dyn BuildAssociated<T>>>
§associated_data: HashMap<&'static str, AssociatedData>
Implementations§
source§impl<T: Node> HierarchyNode<T>
impl<T: Node> HierarchyNode<T>
pub fn new(root: T) -> Self
pub fn push_child<U: Node + 'static>(&mut self, node: U)
pub fn extend_boxed<Iter: IntoIterator<Item = Box<dyn Node>>>( &mut self, nodes: Iter )
pub fn extend_children<U: Node + 'static, Iter: IntoIterator<Item = U>>( &mut self, nodes: Iter )
pub fn set_associated<U: BuildAssociated<T> + 'static>(&mut self, associated: U)
pub fn insert_data<U: Into<AssociatedData>>( &mut self, key: &'static str, data: U )
pub fn get_data(&self, key: &'static str) -> Option<&AssociatedData>
Trait Implementations§
source§impl From<HierarchyNode<<Bundle as Displayed>::Node>> for AnyExprNode
impl From<HierarchyNode<<Bundle as Displayed>::Node>> for AnyExprNode
source§impl From<HierarchyNode<<Point as Displayed>::Node>> for AnyExprNode
impl From<HierarchyNode<<Point as Displayed>::Node>> for AnyExprNode
source§impl From<HierarchyNode<<PointCollection as Displayed>::Node>> for AnyExprNode
impl From<HierarchyNode<<PointCollection as Displayed>::Node>> for AnyExprNode
source§fn from(value: HierarchyNode<<PointCollection as Displayed>::Node>) -> Self
fn from(value: HierarchyNode<<PointCollection as Displayed>::Node>) -> Self
Converts to this type from the input type.
source§impl<T: Node> Node for HierarchyNode<T>
impl<T: Node> Node for HierarchyNode<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for HierarchyNode<T>
impl<T> !Send for HierarchyNode<T>
impl<T> !Sync for HierarchyNode<T>
impl<T> Unpin for HierarchyNode<T>
impl<T> !UnwindSafe for HierarchyNode<T>
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
source§impl<T> Convert for T
impl<T> Convert for T
source§fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
Errors Read more
source§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
Errors Read more