pub struct GraphBuilder { /* private fields */ }Implementations§
Source§impl GraphBuilder
impl GraphBuilder
pub fn new_vertex<'a>(&'a mut self) -> VertexBuilder<'a>
Sourcepub fn remove_vertex(
&mut self,
handle: VertexHandle,
) -> Result<(), LatticeError>
pub fn remove_vertex( &mut self, handle: VertexHandle, ) -> Result<(), LatticeError>
Removes a vertex and all attatched edges.
Sourcepub fn edit_vertex<'a>(
&'a mut self,
handle: VertexHandle,
) -> Result<VertexBuilder<'a>, LatticeError>
pub fn edit_vertex<'a>( &'a mut self, handle: VertexHandle, ) -> Result<VertexBuilder<'a>, LatticeError>
Return a VertexBuilder to edit the vertex.
Sourcepub fn get_vertex(&self, handle: VertexHandle) -> Option<&VertexData>
pub fn get_vertex(&self, handle: VertexHandle) -> Option<&VertexData>
Get vertex data.
Sourcepub fn new_edge(
&mut self,
from: VertexHandle,
label: PropertyHandle,
to: VertexHandle,
) -> Result<&mut Self, LatticeError>
pub fn new_edge( &mut self, from: VertexHandle, label: PropertyHandle, to: VertexHandle, ) -> Result<&mut Self, LatticeError>
Create a new edge to link vertices.
Sourcepub fn remove_edge(&mut self, handle: EdgeHandle) -> Result<(), LatticeError>
pub fn remove_edge(&mut self, handle: EdgeHandle) -> Result<(), LatticeError>
Removes an edge from the graph.
Sourcepub fn edit_edge<'a>(
&'a mut self,
handle: EdgeHandle,
) -> Result<EdgeBuilder<'a>, LatticeError>
pub fn edit_edge<'a>( &'a mut self, handle: EdgeHandle, ) -> Result<EdgeBuilder<'a>, LatticeError>
Return an EdgeBuilder to edit the edge.
Sourcepub fn get_edge(&self, handle: EdgeHandle) -> Option<&EdgeData>
pub fn get_edge(&self, handle: EdgeHandle) -> Option<&EdgeData>
Get edge data.
Source§impl GraphBuilder
impl GraphBuilder
pub fn get_vertex_global_id( &self, handle: VertexHandle, ) -> Result<Option<u64>, LatticeError>
pub fn get_mut_attributes( &mut self, handle: VertexHandle, ) -> Result<&mut Vec<(PropertyHandle, Primitive)>, LatticeError>
pub fn get_incoming_edges( &self, handle: VertexHandle, ) -> Result<&Vec<EdgeHandle>, LatticeError>
pub fn get_outgoing_edges( &self, handle: VertexHandle, ) -> Result<&Vec<EdgeHandle>, LatticeError>
Sourcepub fn iter_vertices(&self) -> impl Iterator<Item = (Handle, &VertexData)>
pub fn iter_vertices(&self) -> impl Iterator<Item = (Handle, &VertexData)>
Iterate through all graph vertices.
Sourcepub fn iter_edges(&self) -> impl Iterator<Item = (Handle, &EdgeData)>
pub fn iter_edges(&self) -> impl Iterator<Item = (Handle, &EdgeData)>
Iterate through all graph edges.
Source§impl GraphBuilder
impl GraphBuilder
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphBuilder
impl RefUnwindSafe for GraphBuilder
impl Send for GraphBuilder
impl Sync for GraphBuilder
impl Unpin for GraphBuilder
impl UnsafeUnpin for GraphBuilder
impl UnwindSafe for GraphBuilder
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