pub struct NodeGraph<T: NodeDefinition> { /* private fields */ }
Implementations§
Source§impl<T: NodeDefinition> NodeGraph<T>
impl<T: NodeDefinition> NodeGraph<T>
pub fn clear(&mut self)
pub fn refresh_spatial_cache(&mut self)
pub fn query_nearest_nodes( &self, x: i64, y: i64, ) -> impl Iterator<Item = NodeId<T>> + '_
pub fn query_region_nodes( &self, fx: i64, fy: i64, tx: i64, ty: i64, extrude: i64, ) -> impl Iterator<Item = NodeId<T>> + '_
pub fn suggest_all_nodes( x: i64, y: i64, registry: &Registry, ) -> Vec<ResponseSuggestionNode<T>>
pub fn suggest_node_input_pin( &self, x: i64, y: i64, id: NodeId<T>, name: &str, registry: &Registry, ) -> Vec<ResponseSuggestionNode<T>>
pub fn suggest_node_output_pin( &self, x: i64, y: i64, id: NodeId<T>, name: &str, registry: &Registry, ) -> Vec<ResponseSuggestionNode<T>>
pub fn node(&self, id: NodeId<T>) -> Option<&Node<T>>
pub fn node_mut(&mut self, id: NodeId<T>) -> Option<&mut Node<T>>
pub fn nodes(&self) -> impl Iterator<Item = &Node<T>>
pub fn nodes_mut(&mut self) -> impl Iterator<Item = &mut Node<T>>
pub fn add_node( &mut self, node: Node<T>, registry: &Registry, ) -> Option<NodeId<T>>
pub fn remove_node( &mut self, id: NodeId<T>, registry: &Registry, ) -> Option<Node<T>>
pub fn connect_nodes(&mut self, connection: NodeConnection<T>)
pub fn disconnect_nodes( &mut self, from_node: NodeId<T>, to_node: NodeId<T>, from_pin: &str, to_pin: &str, )
pub fn disconnect_node(&mut self, node: NodeId<T>, pin: Option<&str>)
pub fn connections(&self) -> impl Iterator<Item = &NodeConnection<T>>
pub fn node_connections( &self, id: NodeId<T>, ) -> impl Iterator<Item = &NodeConnection<T>>
pub fn node_connections_in<'a>( &'a self, id: NodeId<T>, pin: Option<&'a str>, ) -> impl Iterator<Item = &NodeConnection<T>> + 'a
pub fn node_connections_out<'a>( &'a self, id: NodeId<T>, pin: Option<&'a str>, ) -> impl Iterator<Item = &NodeConnection<T>> + 'a
pub fn node_neighbors_in<'a>( &'a self, id: NodeId<T>, pin: Option<&'a str>, ) -> impl Iterator<Item = NodeId<T>> + 'a
pub fn node_neighbors_out<'a>( &'a self, id: NodeId<T>, pin: Option<&'a str>, ) -> impl Iterator<Item = NodeId<T>> + 'a
pub fn validate(&self, registry: &Registry) -> Result<(), Vec<NodeGraphError>>
pub fn visit<V: NodeGraphVisitor<T>>( &self, visitor: &mut V, registry: &Registry, ) -> Vec<V::Output>
Trait Implementations§
Source§impl<T: NodeDefinition> Default for NodeGraph<T>
impl<T: NodeDefinition> Default for NodeGraph<T>
Source§impl<'de, T> Deserialize<'de> for NodeGraph<T>
impl<'de, T> Deserialize<'de> for NodeGraph<T>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for NodeGraph<T>
impl<T> RefUnwindSafe for NodeGraph<T>where
T: RefUnwindSafe,
impl<T> Send for NodeGraph<T>where
T: Send,
impl<T> Sync for NodeGraph<T>where
T: Sync,
impl<T> Unpin for NodeGraph<T>where
T: Unpin,
impl<T> UnwindSafe for NodeGraph<T>where
T: 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