Skip to main content

WithEdge

Trait WithEdge 

Source
pub trait WithEdge:
    Sized
    + WithVertex
    + for<'a> EdgeTypes<'a, Self> {
    type Kind: EdgeKind;
    type Edge: 'static + GraphItem;
    type OptionEdge: 'static + GraphItem + Optional<Edge<Self>> + From<Option<Edge<Self>>>;

Show 14 methods // Required methods fn orientation(&self, _e: Edge<Self>) -> Orientation; fn source(&self, e: Edge<Self>) -> Vertex<Self>; fn target(&self, e: Edge<Self>) -> Vertex<Self>; // Provided methods fn ends<'a, I, O>(&'a self, item: I) -> O where I: Ends<'a, Self, O> { ... } fn end_vertices(&self, e: Edge<Self>) -> (Vertex<Self>, Vertex<Self>) { ... } fn with_ends<I>(&self, iter: I) -> EdgesWithEnds<'_, Self, I::IntoIter> where I: IntoIterator, I::Item: IntoOwned<Edge<Self>> { ... } fn opposite(&self, u: Vertex<Self>, e: Edge<Self>) -> Vertex<Self> { ... } fn is_incident(&self, v: Vertex<Self>, e: Edge<Self>) -> bool { ... } fn reverse(&self, e: Edge<Self>) -> Edge<Self> where Self: WithEdge<Kind = Undirected> { ... } fn get_reverse(&self, _e: Edge<Self>) -> Option<Edge<Self>> { ... } fn edge_none() -> OptionEdge<Self> { ... } fn edge_some(e: Edge<Self>) -> OptionEdge<Self> { ... } fn edge_prop<P, T>(&self, value: T) -> P where P: EdgePropMutNew<Self, T>, T: Clone { ... } fn edge_prop_from_fn<P, F, T>(&self, fun: F) -> P where Self: EdgeList, P: EdgePropMutNew<Self, T>, F: FnMut(Edge<Self>) -> T, T: Default + Clone { ... }
}

Required Associated Types§

Source

type Kind: EdgeKind

Source

type Edge: 'static + GraphItem

Source

type OptionEdge: 'static + GraphItem + Optional<Edge<Self>> + From<Option<Edge<Self>>>

Required Methods§

Source

fn orientation(&self, _e: Edge<Self>) -> Orientation

Source

fn source(&self, e: Edge<Self>) -> Vertex<Self>

Source

fn target(&self, e: Edge<Self>) -> Vertex<Self>

Provided Methods§

Source

fn ends<'a, I, O>(&'a self, item: I) -> O
where I: Ends<'a, Self, O>,

Source

fn end_vertices(&self, e: Edge<Self>) -> (Vertex<Self>, Vertex<Self>)

Source

fn with_ends<I>(&self, iter: I) -> EdgesWithEnds<'_, Self, I::IntoIter>
where I: IntoIterator, I::Item: IntoOwned<Edge<Self>>,

Source

fn opposite(&self, u: Vertex<Self>, e: Edge<Self>) -> Vertex<Self>

Source

fn is_incident(&self, v: Vertex<Self>, e: Edge<Self>) -> bool

Source

fn reverse(&self, e: Edge<Self>) -> Edge<Self>
where Self: WithEdge<Kind = Undirected>,

Source

fn get_reverse(&self, _e: Edge<Self>) -> Option<Edge<Self>>

Source

fn edge_none() -> OptionEdge<Self>

Source

fn edge_some(e: Edge<Self>) -> OptionEdge<Self>

Source

fn edge_prop<P, T>(&self, value: T) -> P
where P: EdgePropMutNew<Self, T>, T: Clone,

Source

fn edge_prop_from_fn<P, F, T>(&self, fun: F) -> P
where Self: EdgeList, P: EdgePropMutNew<Self, T>, F: FnMut(Edge<Self>) -> T, T: Default + Clone,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, G: WithEdge> WithEdge for &'a G

Source§

type Kind = <G as WithEdge>::Kind

Source§

type Edge = <G as WithEdge>::Edge

Source§

type OptionEdge = <G as WithEdge>::OptionEdge

Source§

fn source(&self, e: Edge<Self>) -> Vertex<Self>

Source§

fn target(&self, e: Edge<Self>) -> Vertex<Self>

Source§

fn orientation(&self, e: Edge<Self>) -> Orientation

Source§

fn end_vertices(&self, e: Edge<Self>) -> (Vertex<Self>, Vertex<Self>)

Source§

fn opposite(&self, u: Vertex<Self>, e: Edge<Self>) -> Vertex<Self>

Source§

fn get_reverse(&self, e: Edge<Self>) -> Option<Edge<Self>>

Source§

fn edge_none() -> OptionEdge<Self>

Source§

fn edge_some(e: Edge<Self>) -> OptionEdge<Self>

Implementors§