pub struct Graph<K> {
pub nodes: Vec<Node<K>>,
pub edges: Vec<Edge>,
}Fields§
§nodes: Vec<Node<K>>§edges: Vec<Edge>Implementations§
Source§impl<K: Kind> Graph<K>
impl<K: Kind> Graph<K>
Source§impl<K> Graph<K>
impl<K> Graph<K>
Sourcepub fn add_edges(&mut self, spec: &str) -> Result<(), PipelineError>
pub fn add_edges(&mut self, spec: &str) -> Result<(), PipelineError>
Add A>B[:NAME] edges (A>B>C chains); an edge already there is kept as it is.
Sourcepub fn remove_node(&mut self, id: &str) -> bool
pub fn remove_node(&mut self, id: &str) -> bool
Remove a node and its edges; whether it was there.
pub fn node(&self, id: &str) -> Option<&Node<K>>
Trait Implementations§
Source§impl<'de, K> Deserialize<'de> for Graph<K>where
K: Deserialize<'de>,
impl<'de, K> Deserialize<'de> for Graph<K>where
K: Deserialize<'de>,
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
impl<K: PartialEq> StructuralPartialEq for Graph<K>
Auto Trait Implementations§
impl<K> Forget for Graph<K>
impl<K> Freeze for Graph<K>
impl<K> Move for Graph<K>
impl<K> RefUnwindSafe for Graph<K>
impl<K> Send for Graph<K>
impl<K> Sync for Graph<K>
impl<K> Unpin for Graph<K>
impl<K> UnsafeUnpin for Graph<K>
impl<K> UnwindSafe for Graph<K>
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