Struct petgraph::visit::Reversed[][src]

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

An edge-reversing graph adaptor.

All edges have the opposite direction with Reversed.

Trait Implementations

impl<G: Clone> Clone for Reversed<G>[src]

fn clone(&self) -> Reversed<G>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<G> Data for Reversed<G> where
    G: Data
[src]

impl<G> DataMap for Reversed<G> where
    G: DataMap
[src]

fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>[src]

fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>[src]

impl<G> DataMapMut for Reversed<G> where
    G: DataMapMut
[src]

fn node_weight_mut(&mut self, id: Self::NodeId) -> Option<&mut Self::NodeWeight>[src]

fn edge_weight_mut(&mut self, id: Self::EdgeId) -> Option<&mut Self::EdgeWeight>[src]

impl<G: Debug> Debug for Reversed<G>[src]

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

Formats the value using the given formatter. Read more

impl<G: GraphBase> GraphBase for Reversed<G>[src]

type NodeId = G::NodeId

node identifier

type EdgeId = G::EdgeId

edge identifier

impl<G> GraphProp for Reversed<G> where
    G: GraphProp
[src]

type EdgeType = G::EdgeType

The kind edges in the graph.

fn is_directed(&self) -> bool[src]

impl<G> IntoEdgeReferences for Reversed<G> where
    G: IntoEdgeReferences
[src]

impl<G> IntoEdges for Reversed<G> where
    G: IntoEdgesDirected
[src]

type Edges = ReversedEdges<G::EdgesDirected>

fn edges(self, a: Self::NodeId) -> Self::Edges[src]

impl<G> IntoEdgesDirected for Reversed<G> where
    G: IntoEdgesDirected
[src]

impl<G> IntoNeighbors for Reversed<G> where
    G: IntoNeighborsDirected
[src]

type Neighbors = G::NeighborsDirected

fn neighbors(self, n: G::NodeId) -> G::NeighborsDirected[src]

Return an iterator of the neighbors of node a.

impl<G> IntoNeighborsDirected for Reversed<G> where
    G: IntoNeighborsDirected
[src]

impl<G> IntoNodeIdentifiers for Reversed<G> where
    G: IntoNodeIdentifiers
[src]

impl<G> IntoNodeReferences for Reversed<G> where
    G: IntoNodeReferences
[src]

impl<G> NodeCount for Reversed<G> where
    G: NodeCount
[src]

fn node_count(&self) -> usize[src]

impl<G> NodeIndexable for Reversed<G> where
    G: NodeIndexable
[src]

fn node_bound(&self) -> usize[src]

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

fn to_index(&self, a: Self::NodeId) -> usize[src]

Convert a to an integer index.

fn from_index(&self, i: usize) -> Self::NodeId[src]

Convert i to a node index

impl<G: Visitable> Visitable for Reversed<G>[src]

type Map = G::Map

The associated map type

fn visit_map(&self) -> G::Map[src]

Create a new visitor map

fn reset_map(&self, map: &mut Self::Map)[src]

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

impl<G: Copy> Copy for Reversed<G>[src]

impl<G: GraphRef> GraphRef for Reversed<G>[src]

impl<G> NodeCompactIndexable for Reversed<G> where
    G: NodeCompactIndexable
[src]

Auto Trait Implementations

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

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

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.

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

Performs the conversion.

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.

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

Performs the conversion.