pub struct GraphEditor;Expand description
Supports dynamic modification of a graph without full rebuild.
Implementations§
Source§impl GraphEditor
impl GraphEditor
Sourcepub fn insert_node_between(
graph: &mut SimpleGraph,
new_node_id: NodeId,
new_node_label: impl Into<String>,
edge: EdgeId,
) -> GraphResult<()>
pub fn insert_node_between( graph: &mut SimpleGraph, new_node_id: NodeId, new_node_label: impl Into<String>, edge: EdgeId, ) -> GraphResult<()>
Insert new_node_id on an existing edge edge, splitting it into two.
Before: edge.from → edge.to
After: edge.from → new_node_id → edge.to
The edge label of the new segments inherits the label of new_node_id.
§Errors
Returns Err if the edge does not exist in the graph.
Auto Trait Implementations§
impl Freeze for GraphEditor
impl RefUnwindSafe for GraphEditor
impl Send for GraphEditor
impl Sync for GraphEditor
impl Unpin for GraphEditor
impl UnsafeUnpin for GraphEditor
impl UnwindSafe for GraphEditor
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> 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