Skip to main content

BoundProtect

Trait BoundProtect 

Source
pub trait BoundProtect<I, V> {
    // Required methods
    fn get(&self, index: I) -> Option<&V>;
    fn get_safe(&self, index: I) -> &V;
    fn get_mut(&mut self, index: I) -> Option<&mut V>;
    fn get_mut_safe(&mut self, index: I) -> &mut V;
    fn set(&mut self, index: I, value: V) -> Option<V>;
    fn set_safe(&mut self, index: I, value: V) -> V;
}

Required Methods§

Source

fn get(&self, index: I) -> Option<&V>

Source

fn get_safe(&self, index: I) -> &V

Source

fn get_mut(&mut self, index: I) -> Option<&mut V>

Source

fn get_mut_safe(&mut self, index: I) -> &mut V

Source

fn set(&mut self, index: I, value: V) -> Option<V>

Source

fn set_safe(&mut self, index: I, value: V) -> V

Implementors§