Struct fera_graph::props::IgnoreWriteProp
[−]
[src]
pub struct IgnoreWriteProp<T> { /* fields omitted */ }
A property that ignore writes.
This struct
maintains two values, one that is returned when a shared reference is requested
and one that is returned when a mutable reference is requested. Before returning the mutable
reference, the value is cloned from the original value, so it seems that all previous writes
was ignored.
Example
use fera_graph::prelude::*; use fera_graph::props::IgnoreWriteProp; let g = CompleteGraph::new(5); let mut p: IgnoreWriteProp<u32> = g.vertex_prop(3); assert_eq!(3, p[0]); p[0] = 20; // the previous write was "ignored" assert_eq!(3, p[0]);
Trait Implementations
impl<I, T: Clone> Index<I> for IgnoreWriteProp<T>
[src]
type Output = T
The returned type after indexing.
fn index(&self, _: I) -> &Self::Output
[src]
Performs the indexing (container[index]
) operation.
impl<I, T: Clone> IndexMut<I> for IgnoreWriteProp<T>
[src]
fn index_mut(&mut self, _: I) -> &mut Self::Output
[src]
Performs the mutable indexing (container[index]
) operation.
impl<G, T> VertexPropMutNew<G, T> for IgnoreWriteProp<T> where
G: WithVertex,
T: Clone,
[src]
G: WithVertex,
T: Clone,
fn new_vertex_prop(_: &G, value: T) -> Self
[src]
Creates a new vertex prop. Read more
impl<G, T> EdgePropMutNew<G, T> for IgnoreWriteProp<T> where
G: WithEdge,
T: Clone,
[src]
G: WithEdge,
T: Clone,
fn new_edge_prop(_: &G, value: T) -> Self
[src]
Creates a new edge prop. Read more