Struct petgraph::graph::Frozen
[−]
[src]
pub struct Frozen<'a, G: 'a>(_);
Frozen
only allows shared access (read-only) to the
underlying graph G
, but it allows mutable access to its
node and edge weights.
This is used to ensure immutability of the graph's structure while permitting weights to change.
Methods
impl<'a, G> Frozen<'a, G>
[src]
fn new(gr: &'a mut G) -> Self
impl<'a, N, E, Ty, Ix> Frozen<'a, Graph<N, E, Ty, Ix>> where Ty: EdgeType, Ix: IndexType
[src]
fn index_twice_mut<T, U>(&mut self, i: T, j: U) -> (&mut Graph<N, E, Ty, Ix>::Output, &mut Graph<N, E, Ty, Ix>::Output) where Graph<N, E, Ty, Ix>: IndexMut<T> + IndexMut<U>, T: GraphIndex, U: GraphIndex
Trait Implementations
impl<'a, G> Deref for Frozen<'a, G>
[src]
type Target = G
The resulting type after dereferencing
fn deref(&self) -> &G
The method called to dereference a value
impl<'a, G, I> Index<I> for Frozen<'a, G> where G: Index<I>
[src]
type Output = G::Output
The returned type after indexing
fn index(&self, i: I) -> &G::Output
The method for the indexing (Foo[Bar]
) operation
impl<'a, G, I> IndexMut<I> for Frozen<'a, G> where G: IndexMut<I>
[src]
fn index_mut(&mut self, i: I) -> &mut G::Output
The method for the indexing (Foo[Bar]
) operation