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> Data for Reversed<G>where
G: Data,
impl<G> Data for Reversed<G>where
G: Data,
type NodeWeight = <G as Data>::NodeWeight
type EdgeWeight = <G as Data>::EdgeWeight
source§impl<G> DataMap for Reversed<G>where
G: DataMap,
impl<G> DataMap for Reversed<G>where
G: DataMap,
fn node_weight( &self, id: <Reversed<G> as GraphBase>::NodeId ) -> Option<&<Reversed<G> as Data>::NodeWeight>
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,
impl<G> DataMapMut for Reversed<G>where
G: DataMapMut,
fn node_weight_mut( &mut self, id: <Reversed<G> as GraphBase>::NodeId ) -> Option<&mut <Reversed<G> as Data>::NodeWeight>
fn edge_weight_mut( &mut self, id: <Reversed<G> as GraphBase>::EdgeId ) -> Option<&mut <Reversed<G> as Data>::EdgeWeight>
source§impl<G> EdgeCount for Reversed<G>where
G: EdgeCount,
impl<G> EdgeCount for Reversed<G>where
G: EdgeCount,
source§fn edge_count(&self) -> usize
fn edge_count(&self) -> usize
Return the number of edges in the graph.
source§impl<G> EdgeIndexable for Reversed<G>where
G: EdgeIndexable,
impl<G> EdgeIndexable for Reversed<G>where
G: EdgeIndexable,
source§impl<G> GetAdjacencyMatrix for Reversed<G>where
G: GetAdjacencyMatrix,
impl<G> GetAdjacencyMatrix for Reversed<G>where
G: GetAdjacencyMatrix,
§type AdjMatrix = <G as GetAdjacencyMatrix>::AdjMatrix
type AdjMatrix = <G as GetAdjacencyMatrix>::AdjMatrix
The associated adjacency matrix type
source§fn adjacency_matrix(&self) -> <Reversed<G> as GetAdjacencyMatrix>::AdjMatrix
fn adjacency_matrix(&self) -> <Reversed<G> as GetAdjacencyMatrix>::AdjMatrix
Create the adjacency matrix
source§impl<G> IntoEdgeReferences for Reversed<G>where
G: IntoEdgeReferences,
impl<G> IntoEdgeReferences for Reversed<G>where
G: IntoEdgeReferences,
type EdgeRef = ReversedEdgeReference<<G as IntoEdgeReferences>::EdgeRef>
type EdgeReferences = ReversedEdgeReferences<<G as IntoEdgeReferences>::EdgeReferences>
fn edge_references(self) -> <Reversed<G> as IntoEdgeReferences>::EdgeReferences
source§impl<G> IntoEdges for Reversed<G>where
G: IntoEdgesDirected,
impl<G> IntoEdges for Reversed<G>where
G: IntoEdgesDirected,
type Edges = ReversedEdges<<G as IntoEdgesDirected>::EdgesDirected>
fn edges( self, a: <Reversed<G> as GraphBase>::NodeId ) -> <Reversed<G> as IntoEdges>::Edges
source§impl<G> IntoEdgesDirected for Reversed<G>where
G: IntoEdgesDirected,
impl<G> IntoEdgesDirected for Reversed<G>where
G: IntoEdgesDirected,
type EdgesDirected = ReversedEdges<<G as IntoEdgesDirected>::EdgesDirected>
fn edges_directed( self, a: <Reversed<G> as GraphBase>::NodeId, dir: Direction ) -> <Reversed<G> as IntoEdges>::Edges
source§impl<G> IntoNeighbors for Reversed<G>where
G: IntoNeighborsDirected,
impl<G> IntoNeighbors for Reversed<G>where
G: IntoNeighborsDirected,
type Neighbors = <G as IntoNeighborsDirected>::NeighborsDirected
source§fn neighbors(
self,
n: <G as GraphBase>::NodeId
) -> <G as IntoNeighborsDirected>::NeighborsDirected
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>where
G: IntoNeighborsDirected,
impl<G> IntoNeighborsDirected for Reversed<G>where
G: IntoNeighborsDirected,
type NeighborsDirected = <G as IntoNeighborsDirected>::NeighborsDirected
fn neighbors_directed( self, n: <G as GraphBase>::NodeId, d: Direction ) -> <G as IntoNeighborsDirected>::NeighborsDirected
source§impl<G> IntoNodeIdentifiers for Reversed<G>where
G: IntoNodeIdentifiers,
impl<G> IntoNodeIdentifiers for Reversed<G>where
G: IntoNodeIdentifiers,
type NodeIdentifiers = <G as IntoNodeIdentifiers>::NodeIdentifiers
fn node_identifiers( self ) -> <Reversed<G> as IntoNodeIdentifiers>::NodeIdentifiers
source§impl<G> IntoNodeReferences for Reversed<G>where
G: IntoNodeReferences,
impl<G> IntoNodeReferences for Reversed<G>where
G: IntoNodeReferences,
type NodeRef = <G as IntoNodeReferences>::NodeRef
type NodeReferences = <G as IntoNodeReferences>::NodeReferences
fn node_references(self) -> <Reversed<G> as IntoNodeReferences>::NodeReferences
source§impl<G> NodeIndexable for Reversed<G>where
G: NodeIndexable,
impl<G> NodeIndexable for Reversed<G>where
G: NodeIndexable,
impl<G> Copy for Reversed<G>where
G: Copy,
impl<G> GraphRef for Reversed<G>where
G: GraphRef,
impl<G> NodeCompactIndexable for Reversed<G>where
G: NodeCompactIndexable,
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§
source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
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>
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)
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)
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.