pub struct PCNode {
pub display: MaybeUnset<bool>,
pub children: Vec<Option<HierarchyNode<<Point as Displayed>::Node>>>,
pub props: Option<Properties>,
pub expr: Expr<PointCollection>,
}
Expand description
Node for point collections
Fields§
§display: MaybeUnset<bool>
Whether to display the node
children: Vec<Option<HierarchyNode<<Point as Displayed>::Node>>>
The child nodes of the collection’s points
props: Option<Properties>
Properties are stored for later processing as they might be used for conversions.
expr: Expr<PointCollection>
The defining expression
Implementations§
Source§impl PCNode
impl PCNode
Sourcepub fn new(expr: Expr<PointCollection>) -> Self
pub fn new(expr: Expr<PointCollection>) -> Self
Create a new, empty point collection node.
Sourcepub fn push(&mut self, node: Option<HierarchyNode<<Point as Displayed>::Node>>)
pub fn push(&mut self, node: Option<HierarchyNode<<Point as Displayed>::Node>>)
Push a child node.
Sourcepub fn extend<U: IntoIterator<Item = Option<HierarchyNode<<Point as Displayed>::Node>>>>(
&mut self,
nodes: U,
)
pub fn extend<U: IntoIterator<Item = Option<HierarchyNode<<Point as Displayed>::Node>>>>( &mut self, nodes: U, )
Extend child nodes.
Trait Implementations§
Source§impl BuildAssociated<PCNode> for Associated
impl BuildAssociated<PCNode> for Associated
Source§fn build_associated(
self: Box<Self>,
build: &mut Build,
associated: &mut HierarchyNode<PCNode>,
)
fn build_associated( self: Box<Self>, build: &mut Build, associated: &mut HierarchyNode<PCNode>, )
Build the associated node.
Source§impl Node for PCNode
impl Node for PCNode
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 PCNode
impl !RefUnwindSafe for PCNode
impl !Send for PCNode
impl !Sync for PCNode
impl Unpin for PCNode
impl !UnwindSafe for PCNode
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