[][src]Struct graphrepresentations::graph::EdgeRef

pub struct EdgeRef<'a, E> { /* fields omitted */ }

A container for an edge. Is returned by Graph when a complete edge instance is requested.

Methods

impl<'a, E> EdgeRef<'a, E>[src]

pub fn new(start: NodeId, end: NodeId, data: &'a E) -> Self[src]

Creates a new edge ref with the given edge data. This method should not be used by the client.

pub fn start(&self) -> NodeId[src]

Returns the id of the start node of this edge.

pub fn end(&self) -> NodeId[src]

Returns the id of the end node of this edge.

pub fn data(&self) -> &'a E[src]

Returns a reference to the data of this edge.

Trait Implementations

impl<'a, E> From<&'a Edge<E>> for EdgeRef<'a, E>[src]

impl<'a, '_, E: Clone> From<&'_ EdgeRef<'a, E>> for Edge<E>[src]

impl<'a, E: Clone> From<EdgeRef<'a, E>> for Edge<E>[src]

impl<'a, E: PartialEq> PartialEq<EdgeRef<'a, E>> for EdgeRef<'a, E>[src]

impl<'a, E: Eq> Eq for EdgeRef<'a, E>[src]

impl<'a, E: Debug> Debug for EdgeRef<'a, E>[src]

Auto Trait Implementations

impl<'a, E> Send for EdgeRef<'a, E> where
    E: Sync

impl<'a, E> Unpin for EdgeRef<'a, E>

impl<'a, E> Sync for EdgeRef<'a, E> where
    E: Sync

impl<'a, E> UnwindSafe for EdgeRef<'a, E> where
    E: RefUnwindSafe

impl<'a, E> RefUnwindSafe for EdgeRef<'a, E> where
    E: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]