pub struct Reversed<G>(pub G);
Expand description

An edge-reversing graph adaptor.

All edges have the opposite direction with Reversed.

Tuple Fields§

§0: G

Trait Implementations§

source§

impl<G> Clone for Reversed<G>
where G: Clone,

source§

fn clone(&self) -> Reversed<G>

Returns a copy 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<G> Data for Reversed<G>
where G: Data,

source§

impl<G> DataMap for Reversed<G>
where G: DataMap,

source§

fn node_weight( &self, id: <Reversed<G> as GraphBase>::NodeId ) -> Option<&<Reversed<G> as Data>::NodeWeight>

source§

fn edge_weight( &self, id: <Reversed<G> as GraphBase>::EdgeId ) -> Option<&<Reversed<G> as Data>::EdgeWeight>

source§

impl<G> DataMapMut for Reversed<G>
where G: DataMapMut,

source§

fn node_weight_mut( &mut self, id: <Reversed<G> as GraphBase>::NodeId ) -> Option<&mut <Reversed<G> as Data>::NodeWeight>

source§

fn edge_weight_mut( &mut self, id: <Reversed<G> as GraphBase>::EdgeId ) -> Option<&mut <Reversed<G> as Data>::EdgeWeight>

source§

impl<G> Debug for Reversed<G>
where G: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<G> EdgeCount for Reversed<G>
where G: EdgeCount,

source§

fn edge_count(&self) -> usize

Return the number of edges in the graph.
source§

impl<G> EdgeIndexable for Reversed<G>
where G: EdgeIndexable,

source§

fn edge_bound(&self) -> usize

Return an upper bound of the edge indices in the graph (suitable for the size of a bitmap).
source§

fn to_index(&self, a: <Reversed<G> as GraphBase>::EdgeId) -> usize

Convert a to an integer index.
source§

fn from_index(&self, i: usize) -> <Reversed<G> as GraphBase>::EdgeId

Convert i to an edge index. i must be a valid value in the graph.
source§

impl<G> GetAdjacencyMatrix for Reversed<G>

§

type AdjMatrix = <G as GetAdjacencyMatrix>::AdjMatrix

The associated adjacency matrix type
source§

fn adjacency_matrix(&self) -> <Reversed<G> as GetAdjacencyMatrix>::AdjMatrix

Create the adjacency matrix
source§

fn is_adjacent( &self, matrix: &<Reversed<G> as GetAdjacencyMatrix>::AdjMatrix, a: <Reversed<G> as GraphBase>::NodeId, b: <Reversed<G> as GraphBase>::NodeId ) -> bool

Return true if there is an edge from a to b, false otherwise. Read more
source§

impl<G> GraphBase for Reversed<G>
where G: GraphBase,

§

type NodeId = <G as GraphBase>::NodeId

node identifier
§

type EdgeId = <G as GraphBase>::EdgeId

edge identifier
source§

impl<G> GraphProp for Reversed<G>
where G: GraphProp,

§

type EdgeType = <G as GraphProp>::EdgeType

The kind of edges in the graph.
source§

fn is_directed(&self) -> bool

source§

impl<G> IntoEdgeReferences for Reversed<G>

source§

impl<G> IntoEdges for Reversed<G>

source§

impl<G> IntoEdgesDirected for Reversed<G>

source§

impl<G> IntoNeighbors for Reversed<G>

§

type Neighbors = <G as IntoNeighborsDirected>::NeighborsDirected

source§

fn neighbors( self, n: <G as GraphBase>::NodeId ) -> <G as IntoNeighborsDirected>::NeighborsDirected

Return an iterator of the neighbors of node a.
source§

impl<G> IntoNeighborsDirected for Reversed<G>

source§

impl<G> IntoNodeIdentifiers for Reversed<G>

source§

impl<G> IntoNodeReferences for Reversed<G>

source§

impl<G> NodeCount for Reversed<G>
where G: NodeCount,

source§

impl<G> NodeIndexable for Reversed<G>
where G: NodeIndexable,

source§

fn node_bound(&self) -> usize

Return an upper bound of the node indices in the graph (suitable for the size of a bitmap).
source§

fn to_index(&self, a: <Reversed<G> as GraphBase>::NodeId) -> usize

Convert a to an integer index.
source§

fn from_index(&self, i: usize) -> <Reversed<G> as GraphBase>::NodeId

Convert i to a node index. i must be a valid value in the graph.
source§

impl<G> Visitable for Reversed<G>
where G: Visitable,

§

type Map = <G as Visitable>::Map

The associated map type
source§

fn visit_map(&self) -> <G as Visitable>::Map

Create a new visitor map
source§

fn reset_map(&self, map: &mut <Reversed<G> as Visitable>::Map)

Reset the visitor map (and resize to new size of graph if needed)
source§

impl<G> Copy for Reversed<G>
where G: Copy,

source§

impl<G> GraphRef for Reversed<G>
where G: GraphRef,

source§

impl<G> NodeCompactIndexable for Reversed<G>

Auto Trait Implementations§

§

impl<G> Freeze for Reversed<G>
where G: Freeze,

§

impl<G> RefUnwindSafe for Reversed<G>
where G: RefUnwindSafe,

§

impl<G> Send for Reversed<G>
where G: Send,

§

impl<G> Sync for Reversed<G>
where G: Sync,

§

impl<G> Unpin for Reversed<G>
where G: Unpin,

§

impl<G> UnwindSafe for Reversed<G>
where G: UnwindSafe,

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> Downcast for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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,

§

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>,

§

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>,

§

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.
source§

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more