pub struct CollectionNode {
pub display: MaybeUnset<bool>,
pub children: Vec<Box<dyn Node>>,
}
Expand description
A node that represents multiple node. No hierarchy is involved.
Fields§
§display: MaybeUnset<bool>
Whether the node should be displayed.
children: Vec<Box<dyn Node>>
Nodes
Implementations§
Source§impl CollectionNode
impl CollectionNode
Sourcepub fn from_display(display: Properties, context: &CompileContext) -> Self
pub fn from_display(display: Properties, context: &CompileContext) -> Self
Create a new, empty collection node with given display properties
Sourcepub fn push_boxed(&mut self, node: Box<dyn Node>)
pub fn push_boxed(&mut self, node: Box<dyn Node>)
Push a boxed node.
Sourcepub fn extend<T: Node + 'static, U: IntoIterator<Item = T>>(&mut self, nodes: U)
pub fn extend<T: Node + 'static, U: IntoIterator<Item = T>>(&mut self, nodes: U)
Extend the nodes.
Trait Implementations§
Source§impl Debug for CollectionNode
impl Debug for CollectionNode
Source§impl Default for CollectionNode
impl Default for CollectionNode
Source§impl Node for CollectionNode
impl Node for CollectionNode
Source§fn set_display(&mut self, display: bool)
fn set_display(&mut self, display: bool)
Set the general display flag that decides whether this node and its children should be displayed.
Source§fn get_display(&self) -> bool
fn get_display(&self) -> bool
Get whether this node should be displayed.
Source§fn build_unboxed(self, compiler: &mut Build)where
Self: Sized,
fn build_unboxed(self, compiler: &mut Build)where
Self: Sized,
Build this node, with an unboxed
self
type.Auto Trait Implementations§
impl Freeze for CollectionNode
impl !RefUnwindSafe for CollectionNode
impl !Send for CollectionNode
impl !Sync for CollectionNode
impl Unpin for CollectionNode
impl !UnwindSafe for CollectionNode
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>,
Convert
self
into a specific type. Read moreSource§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
Check if
self
can be converted into a specific type. Read more