pub struct NodeID {
pub label: String,
pub uuid: Uuid,
}
Expand description
A unique identifier for a node in the graph, it’s composed of a label and a UUID. By design the only thing the runtime needs to know about a node is its UUID. But for debugging purposes, we also keep the label.
Fields§
§label: String
§uuid: Uuid
Implementations§
Source§impl NodeID
impl NodeID
Sourcepub fn new(label: impl Into<String>) -> NodeID
pub fn new(label: impl Into<String>) -> NodeID
Creates a new NodeID
with a random UUID and the given label.
Sourcepub fn input(&self, input: impl Into<String>) -> InputID
pub fn input(&self, input: impl Into<String>) -> InputID
Creates a new InputID
with the given label. The UUID is
generated from its label and the node’s UUID.
Sourcepub fn output(&self, output: impl Into<String>) -> OutputID
pub fn output(&self, output: impl Into<String>) -> OutputID
Creates a new OutputID
with the given label. The UUID is
generated from its label and the node’s UUID.
Sourcepub fn query(&self, query: impl Into<String>) -> QueryID
pub fn query(&self, query: impl Into<String>) -> QueryID
Creates a new QueryID
with the given label. The UUID is
generated from its label and the node’s UUID.
Sourcepub fn queryable(&self, queryable: impl Into<String>) -> QueryableID
pub fn queryable(&self, queryable: impl Into<String>) -> QueryableID
Creates a new QueryableID
with the given label. The UUID is
generated from its label and the node’s UUID.
Trait Implementations§
impl Eq for NodeID
impl StructuralPartialEq for NodeID
Auto Trait Implementations§
impl Freeze for NodeID
impl RefUnwindSafe for NodeID
impl Send for NodeID
impl Sync for NodeID
impl Unpin for NodeID
impl UnwindSafe for NodeID
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.