pub struct Node<NodeData> {
pub id: NodeId,
pub label: String,
pub inputs: Vec<(String, InputId)>,
pub outputs: Vec<(String, OutputId)>,
pub user_data: NodeData,
}
Expand description
A node inside the Graph
. Nodes have input and output parameters, stored
as ids. They also contain a custom NodeData
struct with whatever data the
user wants to store per-node.
Fields§
§id: NodeId
§label: String
§inputs: Vec<(String, InputId)>
§outputs: Vec<(String, OutputId)>
§user_data: NodeData
Implementations§
Source§impl<NodeData> Node<NodeData>
impl<NodeData> Node<NodeData>
pub fn inputs<'a, DataType: PartialEq, DataValue>( &'a self, graph: &'a Graph<NodeData, DataType, DataValue>, ) -> impl Iterator<Item = &'a InputParam<DataType, DataValue>> + 'a
pub fn outputs<'a, DataType: PartialEq, DataValue>( &'a self, graph: &'a Graph<NodeData, DataType, DataValue>, ) -> impl Iterator<Item = &'a OutputParam<DataType>> + 'a
pub fn input_ids(&self) -> impl Iterator<Item = InputId> + '_
pub fn output_ids(&self) -> impl Iterator<Item = OutputId> + '_
pub fn get_input(&self, name: &str) -> Result<InputId, EguiGraphError>
pub fn get_output(&self, name: &str) -> Result<OutputId, EguiGraphError>
Trait Implementations§
Auto Trait Implementations§
impl<NodeData> Freeze for Node<NodeData>where
NodeData: Freeze,
impl<NodeData> RefUnwindSafe for Node<NodeData>where
NodeData: RefUnwindSafe,
impl<NodeData> Send for Node<NodeData>where
NodeData: Send,
impl<NodeData> Sync for Node<NodeData>where
NodeData: Sync,
impl<NodeData> Unpin for Node<NodeData>where
NodeData: Unpin,
impl<NodeData> UnwindSafe for Node<NodeData>where
NodeData: UnwindSafe,
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