Struct bevy_internal::utils::petgraph::visit::EdgeFiltered
source · pub struct EdgeFiltered<G, F>(pub G, pub F);
Expand description
An edge-filtering graph adaptor.
The adaptor may filter out edges. The filter implements the trait
FilterEdge
. Closures of type Fn(G::EdgeRef) -> bool
already
implement this trait.
The filter may use edge source, target, id, and weight to select whether to include the edge or not.
Tuple Fields§
§0: G
§1: F
Implementations§
source§impl<F, G> EdgeFiltered<G, F>
impl<F, G> EdgeFiltered<G, F>
sourcepub fn from_fn(graph: G, filter: F) -> EdgeFiltered<G, F>
pub fn from_fn(graph: G, filter: F) -> EdgeFiltered<G, F>
Create an EdgeFiltered
adaptor from the closure filter
.
Trait Implementations§
source§impl<G, F> Clone for EdgeFiltered<G, F>
impl<G, F> Clone for EdgeFiltered<G, F>
source§fn clone(&self) -> EdgeFiltered<G, F>
fn clone(&self) -> EdgeFiltered<G, F>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<G, F> Data for EdgeFiltered<G, F>where
G: Data,
impl<G, F> Data for EdgeFiltered<G, F>where
G: Data,
type NodeWeight = <G as Data>::NodeWeight
type EdgeWeight = <G as Data>::EdgeWeight
source§impl<G, F> Debug for EdgeFiltered<G, F>
impl<G, F> Debug for EdgeFiltered<G, F>
source§impl<G, F> EdgeIndexable for EdgeFiltered<G, F>where
G: EdgeIndexable,
impl<G, F> EdgeIndexable for EdgeFiltered<G, F>where
G: EdgeIndexable,
source§fn edge_bound(&self) -> usize
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: <EdgeFiltered<G, F> as GraphBase>::EdgeId) -> usize
fn to_index(&self, a: <EdgeFiltered<G, F> as GraphBase>::EdgeId) -> usize
Convert
a
to an integer index.source§fn from_index(&self, i: usize) -> <EdgeFiltered<G, F> as GraphBase>::EdgeId
fn from_index(&self, i: usize) -> <EdgeFiltered<G, F> as GraphBase>::EdgeId
Convert
i
to an edge index. i
must be a valid value in the graph.source§impl<G, F> GraphBase for EdgeFiltered<G, F>where
G: GraphBase,
impl<G, F> GraphBase for EdgeFiltered<G, F>where
G: GraphBase,
source§impl<G, F> GraphProp for EdgeFiltered<G, F>where
G: GraphProp,
impl<G, F> GraphProp for EdgeFiltered<G, F>where
G: GraphProp,
source§impl<'a, G, F> IntoEdgeReferences for &'a EdgeFiltered<G, F>
impl<'a, G, F> IntoEdgeReferences for &'a EdgeFiltered<G, F>
type EdgeRef = <G as IntoEdgeReferences>::EdgeRef
type EdgeReferences = EdgeFilteredEdges<'a, G, <G as IntoEdgeReferences>::EdgeReferences, F>
fn edge_references( self ) -> <&'a EdgeFiltered<G, F> as IntoEdgeReferences>::EdgeReferences
source§impl<'a, G, F> IntoEdges for &'a EdgeFiltered<G, F>
impl<'a, G, F> IntoEdges for &'a EdgeFiltered<G, F>
source§impl<'a, G, F> IntoEdgesDirected for &'a EdgeFiltered<G, F>
impl<'a, G, F> IntoEdgesDirected for &'a EdgeFiltered<G, F>
type EdgesDirected = EdgeFilteredEdges<'a, G, <G as IntoEdgesDirected>::EdgesDirected, F>
fn edges_directed( self, n: <G as GraphBase>::NodeId, dir: Direction ) -> <&'a EdgeFiltered<G, F> as IntoEdgesDirected>::EdgesDirected
source§impl<'a, G, F> IntoNeighbors for &'a EdgeFiltered<G, F>
impl<'a, G, F> IntoNeighbors for &'a EdgeFiltered<G, F>
type Neighbors = EdgeFilteredNeighbors<'a, G, F>
source§fn neighbors(
self,
n: <G as GraphBase>::NodeId
) -> <&'a EdgeFiltered<G, F> as IntoNeighbors>::Neighbors
fn neighbors( self, n: <G as GraphBase>::NodeId ) -> <&'a EdgeFiltered<G, F> as IntoNeighbors>::Neighbors
Return an iterator of the neighbors of node
a
.source§impl<'a, G, F> IntoNeighborsDirected for &'a EdgeFiltered<G, F>
impl<'a, G, F> IntoNeighborsDirected for &'a EdgeFiltered<G, F>
type NeighborsDirected = EdgeFilteredNeighborsDirected<'a, G, F>
fn neighbors_directed( self, n: <G as GraphBase>::NodeId, dir: Direction ) -> <&'a EdgeFiltered<G, F> as IntoNeighborsDirected>::NeighborsDirected
source§impl<'a, G, F> IntoNodeIdentifiers for &'a EdgeFiltered<G, F>where
G: IntoNodeIdentifiers,
impl<'a, G, F> IntoNodeIdentifiers for &'a EdgeFiltered<G, F>where
G: IntoNodeIdentifiers,
type NodeIdentifiers = <G as IntoNodeIdentifiers>::NodeIdentifiers
fn node_identifiers( self ) -> <&'a EdgeFiltered<G, F> as IntoNodeIdentifiers>::NodeIdentifiers
source§impl<'a, G, F> IntoNodeReferences for &'a EdgeFiltered<G, F>where
G: IntoNodeReferences,
impl<'a, G, F> IntoNodeReferences for &'a EdgeFiltered<G, F>where
G: IntoNodeReferences,
type NodeRef = <G as IntoNodeReferences>::NodeRef
type NodeReferences = <G as IntoNodeReferences>::NodeReferences
fn node_references( self ) -> <&'a EdgeFiltered<G, F> as IntoNodeReferences>::NodeReferences
source§impl<G, F> NodeCount for EdgeFiltered<G, F>where
G: NodeCount,
impl<G, F> NodeCount for EdgeFiltered<G, F>where
G: NodeCount,
fn node_count(&self) -> usize
source§impl<G, F> NodeIndexable for EdgeFiltered<G, F>where
G: NodeIndexable,
impl<G, F> NodeIndexable for EdgeFiltered<G, F>where
G: NodeIndexable,
source§fn node_bound(&self) -> usize
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: <EdgeFiltered<G, F> as GraphBase>::NodeId) -> usize
fn to_index(&self, a: <EdgeFiltered<G, F> as GraphBase>::NodeId) -> usize
Convert
a
to an integer index.source§fn from_index(&self, i: usize) -> <EdgeFiltered<G, F> as GraphBase>::NodeId
fn from_index(&self, i: usize) -> <EdgeFiltered<G, F> as GraphBase>::NodeId
Convert
i
to a node index. i
must be a valid value in the graph.source§impl<G, F> Visitable for EdgeFiltered<G, F>where
G: Visitable,
impl<G, F> Visitable for EdgeFiltered<G, F>where
G: Visitable,
impl<G, F> Copy for EdgeFiltered<G, F>
impl<G, F> NodeCompactIndexable for EdgeFiltered<G, F>where
G: NodeCompactIndexable,
Auto Trait Implementations§
impl<G, F> RefUnwindSafe for EdgeFiltered<G, F>where
F: RefUnwindSafe,
G: RefUnwindSafe,
impl<G, F> Send for EdgeFiltered<G, F>
impl<G, F> Sync for EdgeFiltered<G, F>
impl<G, F> Unpin for EdgeFiltered<G, F>
impl<G, F> UnwindSafe for EdgeFiltered<G, F>where
F: UnwindSafe,
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.