Struct graphalgos::graphs::Edge
source · pub struct Edge {
pub endpoints: (String, String),
pub weight: GNumber,
pub edge_type: EdgeType,
}
Expand description
Edge Structure
Edges have three fields
- endpoints (a,b) - this contains the info of the two vertices of the edge (A – B)
- weight - the weight of the edge. It’s of type GNumber
- edge_type - the type of the edge (Directed / Undirected)
Fields§
§endpoints: (String, String)
§weight: GNumber
§edge_type: EdgeType
Trait Implementations§
source§impl Ord for Edge
impl Ord for Edge
source§impl PartialOrd<Edge> for Edge
impl PartialOrd<Edge> for Edge
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Edge
Auto Trait Implementations§
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnwindSafe for Edge
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