Struct nannou::ui::prelude::widget::graph::NodeContext [−][src]
pub struct NodeContext<'a, NI> where
NI: 'a + NodeId, { /* fields omitted */ }
A context for a node yielded during the node instantiation stage.
This type can be used to:
- Get the position of the node via
point()
. - Get the ID for this node via
node_id()
. - Convert into a
NodeWidget
ready for instantiation within theUi
viawidget(a_widget)
.
Methods
impl<'a, NI> NodeContext<'a, NI> where
NI: NodeId,
[src]
impl<'a, NI> NodeContext<'a, NI> where
NI: NodeId,
pub fn node_id(&self) -> NI
[src]
pub fn node_id(&self) -> NI
The unique identifier associated with this node.
pub fn point(&self) -> [f64; 2]
[src]
pub fn point(&self) -> [f64; 2]
The location of the node.
pub fn widget<W>(self, widget: W) -> NodeWidget<'a, NI, W>
[src]
pub fn widget<W>(self, widget: W) -> NodeWidget<'a, NI, W>
Specify the widget to use
Auto Trait Implementations
impl<'a, NI> Send for NodeContext<'a, NI> where
NI: Sync,
impl<'a, NI> Send for NodeContext<'a, NI> where
NI: Sync,
impl<'a, NI> Sync for NodeContext<'a, NI> where
NI: Sync,
impl<'a, NI> Sync for NodeContext<'a, NI> where
NI: Sync,