pub trait PosGet<V> {
// Required methods
fn pos_get(&self, pos: Pos) -> Option<&V>;
fn pos_get_mut(&mut self, pos: Pos) -> Option<&mut V>;
}Expand description
Allows indexing with a Pos instance.
Required Methods§
Sourcefn pos_get(&self, pos: Pos) -> Option<&V>
fn pos_get(&self, pos: Pos) -> Option<&V>
Returns a reference to the value at pos,
or None if the position cannot index the type.
Sourcefn pos_get_mut(&mut self, pos: Pos) -> Option<&mut V>
fn pos_get_mut(&mut self, pos: Pos) -> Option<&mut V>
Returns a mutable reference to the value at pos,
or None if the position cannot index the type.