[−][src]Struct redo::record::Checkpoint
Wraps a record and gives it checkpoint functionality.
Methods
impl<'_, C: Command, F: FnMut(Signal)> Checkpoint<'_, C, F>
[src]
pub fn apply(&mut self, command: C) -> Result<C>
[src]
Calls the apply
method.
pub fn undo(&mut self) -> Result<C>
[src]
Calls the undo
method.
pub fn redo(&mut self) -> Result<C>
[src]
Calls the redo
method.
pub fn commit(self)
[src]
Commits the changes and consumes the checkpoint.
pub fn cancel(self) -> Result<C>
[src]
Cancels the changes and consumes the checkpoint.
Errors
If an error occur when canceling the changes, the error is returned and the remaining commands are not canceled.
pub fn queue(&mut self) -> Queue<C, F>
[src]
Returns a queue.
pub fn checkpoint(&mut self) -> Checkpoint<C, F>
[src]
Returns a checkpoint.
pub fn target(&self) -> &C::Target
[src]
Returns a reference to the target.
Trait Implementations
impl<'a, C: Command, F> From<&'a mut Record<C, F>> for Checkpoint<'a, C, F>
[src]
Auto Trait Implementations
impl<'a, C, F> RefUnwindSafe for Checkpoint<'a, C, F> where
C: RefUnwindSafe,
F: RefUnwindSafe,
<C as Command>::Target: RefUnwindSafe,
C: RefUnwindSafe,
F: RefUnwindSafe,
<C as Command>::Target: RefUnwindSafe,
impl<'a, C, F> Send for Checkpoint<'a, C, F> where
C: Send,
F: Send,
<C as Command>::Target: Send,
C: Send,
F: Send,
<C as Command>::Target: Send,
impl<'a, C, F> Sync for Checkpoint<'a, C, F> where
C: Sync,
F: Sync,
<C as Command>::Target: Sync,
C: Sync,
F: Sync,
<C as Command>::Target: Sync,
impl<'a, C, F> Unpin for Checkpoint<'a, C, F> where
C: Unpin,
C: Unpin,
impl<'a, C, F> !UnwindSafe for Checkpoint<'a, C, F>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,