pub enum GraphChange {
AddNode(usize),
RemoveNode(usize),
AddEdge(usize, usize, f64),
RemoveEdge(usize, usize),
UpdateEdgeWeight(usize, usize, f64),
UpdateNodeAttribute(usize, String, f64),
}Expand description
An atomic structural change that can be applied to a graph.
Variants§
AddNode(usize)
Insert a new node.
RemoveNode(usize)
Delete a node (and any incident edges).
AddEdge(usize, usize, f64)
Insert an undirected edge with the given weight.
RemoveEdge(usize, usize)
Delete an undirected edge.
UpdateEdgeWeight(usize, usize, f64)
Overwrite the weight of an existing (or new) edge.
UpdateNodeAttribute(usize, String, f64)
Set a floating-point attribute on a node.
Trait Implementations§
Source§impl Clone for GraphChange
impl Clone for GraphChange
Source§fn clone(&self) -> GraphChange
fn clone(&self) -> GraphChange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GraphChange
impl RefUnwindSafe for GraphChange
impl Send for GraphChange
impl Sync for GraphChange
impl Unpin for GraphChange
impl UnsafeUnpin for GraphChange
impl UnwindSafe for GraphChange
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more