pub struct Node<N> { /* private fields */ }Expand description
A graph node with payload and typed ports.
Implementations§
Source§impl<N> Node<N>
impl<N> Node<N>
Sourcepub fn new(id: NodeId, payload: N, ports: Vec<Port>) -> Self
pub fn new(id: NodeId, payload: N, ports: Vec<Port>) -> Self
Creates a node with the provided identifier, payload, and ports.
Sourcepub fn payload_mut(&mut self) -> &mut N
pub fn payload_mut(&mut self) -> &mut N
Returns mutable access to the stored payload.
Trait Implementations§
impl<N: Eq> Eq for Node<N>
impl<N> StructuralPartialEq for Node<N>
Auto Trait Implementations§
impl<N> Freeze for Node<N>where
N: Freeze,
impl<N> RefUnwindSafe for Node<N>where
N: RefUnwindSafe,
impl<N> Send for Node<N>where
N: Send,
impl<N> Sync for Node<N>where
N: Sync,
impl<N> Unpin for Node<N>where
N: Unpin,
impl<N> UnsafeUnpin for Node<N>where
N: UnsafeUnpin,
impl<N> UnwindSafe for Node<N>where
N: 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