pub enum UndoRedoError {
ChangeNotFound(String),
CheckpointNotFound(String),
NoMoreUndos,
NoMoreRedos,
StorageError(String),
ValidationError(String),
SerializationError(Error),
IoError(Error),
}Expand description
Errors that can occur in the undo/redo system
Variants§
ChangeNotFound(String)
Change not found in history
CheckpointNotFound(String)
Checkpoint not found
NoMoreUndos
No more undos available
NoMoreRedos
No more redos available
StorageError(String)
Storage error
ValidationError(String)
Validation error
SerializationError(Error)
Serialization error
IoError(Error)
IO error
Implementations§
Source§impl UndoRedoError
impl UndoRedoError
Sourcepub fn change_not_found(id: impl Into<String>) -> Self
pub fn change_not_found(id: impl Into<String>) -> Self
Create a new ChangeNotFound error with context
Sourcepub fn checkpoint_not_found(id: impl Into<String>) -> Self
pub fn checkpoint_not_found(id: impl Into<String>) -> Self
Create a new CheckpointNotFound error with context
Sourcepub fn storage_error(msg: impl Into<String>) -> Self
pub fn storage_error(msg: impl Into<String>) -> Self
Create a new StorageError with context
Sourcepub fn validation_error(msg: impl Into<String>) -> Self
pub fn validation_error(msg: impl Into<String>) -> Self
Create a new ValidationError with context
Trait Implementations§
Source§impl Debug for UndoRedoError
impl Debug for UndoRedoError
Source§impl Display for UndoRedoError
impl Display for UndoRedoError
Source§impl Error for UndoRedoError
impl Error for UndoRedoError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for UndoRedoError
impl From<Error> for UndoRedoError
Auto Trait Implementations§
impl Freeze for UndoRedoError
impl !RefUnwindSafe for UndoRedoError
impl Send for UndoRedoError
impl Sync for UndoRedoError
impl Unpin for UndoRedoError
impl !UnwindSafe for UndoRedoError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more