Trait graphene::core::GraphWrapper
[−]
[src]
pub trait GraphWrapper where
<Self::Wrapped as BaseGraph>::Vertex: Vertex,
<Self::Wrapped as BaseGraph>::Weight: Weight,
<<Self::Wrapped as BaseGraph>::VertexIter as IntoIterator>::IntoIter: ExactSizeIterator,
<<Self::Wrapped as BaseGraph>::EdgeIter as IntoIterator>::IntoIter: ExactSizeIterator, { type Wrapped: ConstrainedGraph; fn wrap(g: Self::Wrapped) -> Self; fn wrapped(&self) -> &Self::Wrapped; fn wrapped_mut(&mut self) -> &mut Self::Wrapped; fn unwrap(self) -> Self::Wrapped; }
Defines a type that wraps a ConstrainedGraph
.
Associated Types
type Wrapped: ConstrainedGraph
Required Methods
fn wrap(g: Self::Wrapped) -> Self
fn wrapped(&self) -> &Self::Wrapped
fn wrapped_mut(&mut self) -> &mut Self::Wrapped
fn unwrap(self) -> Self::Wrapped
Implementors
impl<G> GraphWrapper for UndirectedGraph<G> where
G: ConstrainedGraph,
<G as BaseGraph>::Vertex: Vertex,
<G as BaseGraph>::Weight: Weight,
<<G as BaseGraph>::VertexIter as IntoIterator>::IntoIter: ExactSizeIterator,
<<G as BaseGraph>::EdgeIter as IntoIterator>::IntoIter: ExactSizeIterator, type Wrapped = G;impl<G> GraphWrapper for UniqueGraph<G> where
G: ConstrainedGraph,
<G as BaseGraph>::Vertex: Vertex,
<G as BaseGraph>::Weight: Weight,
<<G as BaseGraph>::VertexIter as IntoIterator>::IntoIter: ExactSizeIterator,
<<G as BaseGraph>::EdgeIter as IntoIterator>::IntoIter: ExactSizeIterator, type Wrapped = G;