Struct redo::Group
[−]
[src]
pub struct Group<K: Hash + Eq, V> { /* fields omitted */ }
A group of either stacks or records.
Methods
impl<K: Hash + Eq, V> Group<K, V>
[src]
fn new() -> Group<K, V>
[src]
Returns a new Group
.
fn len(&self) -> usize
[src]
Returns the number of items in the group.
fn is_empty(&self) -> bool
[src]
Returns true
if the group is empty.
fn insert(&mut self, k: K, v: V) -> Option<V>
[src]
Inserts an item into the group.
fn remove(&mut self, k: &K) -> Option<V>
[src]
Removes an item from the group.
fn get(&self) -> Option<&V>
[src]
Gets the current active item in the group.
fn set<T: Into<Option<K>>>(&mut self, k: T) -> bool
[src]
Sets the current active item in the group.
impl<K: Hash + Eq, R, C: Command<R>> Group<K, Stack<R, C>>
[src]
fn push(&mut self, cmd: C) -> Option<Result<(), Error<R, C>>>
[src]
Calls the push
method on the active Stack
.
fn pop(&mut self) -> Option<Result<C, Error<R, C>>>
[src]
Calls the pop
method on the active Stack
.
impl<'a, K: Hash + Eq, R, C: Command<R>> Group<K, Record<'a, R, C>>
[src]
fn push(&mut self, cmd: C) -> Option<Result<Commands<C>, Error<R, C>>>
[src]
Calls the push
method on the active Record
.
fn redo(&mut self) -> Option<Result<(), C::Err>>
[src]
Calls the redo
method on the active Record
.
fn undo(&mut self) -> Option<Result<(), C::Err>>
[src]
Calls the undo
method on the active Record
.
Trait Implementations
impl<K: Clone + Hash + Eq, V: Clone> Clone for Group<K, V>
[src]
fn clone(&self) -> Group<K, V>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<K: Debug + Hash + Eq, V: Debug> Debug for Group<K, V>
[src]
impl<K: Eq + Hash + Eq, V: Eq> Eq for Group<K, V>
[src]
impl<K: PartialEq + Hash + Eq, V: PartialEq> PartialEq for Group<K, V>
[src]
fn eq(&self, __arg_0: &Group<K, V>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Group<K, V>) -> bool
[src]
This method tests for !=
.