Struct redo::record::Queue [−][src]
pub struct Queue<'a, C: Command, F> { /* fields omitted */ }
Expand description
Wraps a record and gives it batch queue functionality.
Examples
let mut record = Record::default();
let mut queue = record.queue();
queue.apply(Add('a'));
queue.apply(Add('b'));
queue.apply(Add('c'));
assert_eq!(queue.target(), "");
queue.commit()?;
assert_eq!(record.target(), "abc");
Implementations
Applies the queued commands.
Errors
If an error occurs, it stops applying the commands and returns the error.
Returns a checkpoint.