Struct Edge

Source
pub struct Edge<T: GraphDefinition> {
    pub origin: Node<T>,
    pub target: Node<T>,
    pub meta: Rc<T::EdgeMeta>,
    pub graph_type: PhantomData<T>,
}

Fields§

§origin: Node<T>§target: Node<T>§meta: Rc<T::EdgeMeta>§graph_type: PhantomData<T>

Implementations§

Source§

impl<T: GraphDefinition> Edge<T>

Source

pub fn new(from: Node<T>, to: Node<T>, meta: Rc<T::EdgeMeta>) -> Self

Trait Implementations§

Source§

impl<T: GraphDefinition> Clone for Edge<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, T: GraphDefinition> GraphWalk<'a, Node<T>, Edge<T>> for ConcreteGraph<T>

Source§

fn nodes(&'a self) -> Nodes<'a, Node<T>>

Returns all the nodes in this graph.
Source§

fn edges(&'a self) -> Edges<'a, Edge<T>>

Returns all of the edges in this graph.
Source§

fn source(&'a self, edge: &Edge<T>) -> Node<T>

The source node for edge.
Source§

fn target(&'a self, edge: &Edge<T>) -> Node<T>

The target node for edge.
Source§

impl<T> Identifiable<EdgeIdentity<<T as GraphDefinition>::Id>> for Edge<T>
where T: GraphDefinition,

Source§

fn get_id(&self) -> EdgeIdentity<T::Id>

Source§

impl<'a, T: GraphDefinition> Labeller<'a, Node<T>, Edge<T>> for ConcreteGraph<T>

Source§

fn graph_id(&'a self) -> Id<'a>

Must return a DOT compatible identifier naming the graph.
Source§

fn node_id(&'a self, n: &Node<T>) -> Id<'a>

Maps n to a unique identifier with respect to self. The implementer is responsible for ensuring that the returned name is a valid DOT identifier.
Source§

fn node_shape(&'a self, _node: &N) -> Option<LabelText<'a>>

Maps n to one of the graphviz shape names. If None is returned, no shape attribute is specified.
Source§

fn node_label(&'a self, n: &N) -> LabelText<'a>

Maps n to a label that will be used in the rendered output. The label need not be unique, and may be the empty string; the default is just the output from node_id.
Source§

fn edge_label(&'a self, e: &E) -> LabelText<'a>

Maps e to a label that will be used in the rendered output. The label need not be unique, and may be the empty string; the default is in fact the empty string.
Source§

fn node_style(&'a self, _n: &N) -> Style

Maps n to a style that will be used in the rendered output.
Source§

fn node_color(&'a self, _node: &N) -> Option<LabelText<'a>>

Maps n to one of the graphviz color names. If None is returned, no color attribute is specified.
Source§

fn edge_end_arrow(&'a self, _e: &E) -> Arrow

Maps e to arrow style that will be used on the end of an edge. Defaults to default arrow style.
Source§

fn edge_start_arrow(&'a self, _e: &E) -> Arrow

Maps e to arrow style that will be used on the end of an edge. Defaults to default arrow style.
Source§

fn edge_style(&'a self, _e: &E) -> Style

Maps e to a style that will be used in the rendered output.
Source§

fn edge_color(&'a self, _e: &E) -> Option<LabelText<'a>>

Maps e to one of the graphviz color names. If None is returned, no color attribute is specified.
Source§

fn kind(&self) -> Kind

The kind of graph, defaults to Kind::Digraph.
Source§

impl<T: GraphDefinition> Ord for Edge<T>

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T: GraphDefinition> PartialEq for Edge<T>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: GraphDefinition> PartialOrd for Edge<T>

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T: GraphDefinition> Eq for Edge<T>

Auto Trait Implementations§

§

impl<T> Freeze for Edge<T>
where <T as GraphDefinition>::Id: Freeze,

§

impl<T> !RefUnwindSafe for Edge<T>

§

impl<T> !Send for Edge<T>

§

impl<T> !Sync for Edge<T>

§

impl<T> Unpin for Edge<T>
where <T as GraphDefinition>::Id: Unpin, T: Unpin,

§

impl<T> !UnwindSafe for Edge<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ExtractData<()> for T

Source§

impl<T, D1, D2> ExtractData<(D1, D2)> for T
where T: ExtractData<D1> + ExtractData<D2>, D1: 'static, D2: 'static,

Source§

impl<T, D1, D2, D3> ExtractData<(D1, D2, D3)> for T
where T: ExtractData<D1> + ExtractData<D2> + ExtractData<D3>, D1: 'static, D2: 'static, D3: 'static,

Source§

impl<T, D1, D2, D3, D4> ExtractData<(D1, D2, D3, D4)> for T
where T: ExtractData<D1> + ExtractData<D2> + ExtractData<D3> + ExtractData<D4>, D1: 'static, D2: 'static, D3: 'static, D4: 'static,

Source§

impl<T, D1, D2, D3, D4, D5> ExtractData<(D1, D2, D3, D4, D5)> for T
where T: ExtractData<D1> + ExtractData<D2> + ExtractData<D3> + ExtractData<D4> + ExtractData<D5>, D1: 'static, D2: 'static, D3: 'static, D4: 'static, D5: 'static,

Source§

impl<T, D1, D2, D3, D4, D5, D6> ExtractData<(D1, D2, D3, D4, D5, D6)> for T
where T: ExtractData<D1> + ExtractData<D2> + ExtractData<D3> + ExtractData<D4> + ExtractData<D5> + ExtractData<D6>, D1: 'static, D2: 'static, D3: 'static, D4: 'static, D5: 'static, D6: 'static,

Source§

impl<T, D1, D2, D3, D4, D5, D6, D7> ExtractData<(D1, D2, D3, D4, D5, D6, D7)> for T
where T: ExtractData<D1> + ExtractData<D2> + ExtractData<D3> + ExtractData<D4> + ExtractData<D5> + ExtractData<D6> + ExtractData<D7>, D1: 'static, D2: 'static, D3: 'static, D4: 'static, D5: 'static, D6: 'static, D7: 'static,

Source§

impl<T, D1, D2, D3, D4, D5, D6, D7, D8> ExtractData<(D1, D2, D3, D4, D5, D6, D7, D8)> for T
where T: ExtractData<D1> + ExtractData<D2> + ExtractData<D3> + ExtractData<D4> + ExtractData<D5> + ExtractData<D6> + ExtractData<D7> + ExtractData<D8>, D1: 'static, D2: 'static, D3: 'static, D4: 'static, D5: 'static, D6: 'static, D7: 'static, D8: 'static,

Source§

impl<T, D1, D2, D3, D4, D5, D6, D7, D8, D9> ExtractData<(D1, D2, D3, D4, D5, D6, D7, D8, D9)> for T
where T: ExtractData<D1> + ExtractData<D2> + ExtractData<D3> + ExtractData<D4> + ExtractData<D5> + ExtractData<D6> + ExtractData<D7> + ExtractData<D8> + ExtractData<D9>, D1: 'static, D2: 'static, D3: 'static, D4: 'static, D5: 'static, D6: 'static, D7: 'static, D8: 'static, D9: 'static,

Source§

impl<T, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10> ExtractData<(D1, D2, D3, D4, D5, D6, D7, D8, D9, D10)> for T
where T: ExtractData<D1> + ExtractData<D2> + ExtractData<D3> + ExtractData<D4> + ExtractData<D5> + ExtractData<D6> + ExtractData<D7> + ExtractData<D8> + ExtractData<D9> + ExtractData<D10>, D1: 'static, D2: 'static, D3: 'static, D4: 'static, D5: 'static, D6: 'static, D7: 'static, D8: 'static, D9: 'static, D10: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.