#[non_exhaustive]pub enum EngineError {
Stale {
expected: u64,
actual: u64,
},
Busy {
reason: String,
},
Command {
error: CommandError,
},
Invalid {
message: String,
},
Solve {
failure: SolveFailure,
},
Validation {
what: String,
residual: f64,
tolerance: f64,
},
Cancelled,
NothingToUndo,
NothingToRedo,
NotActive {
what: String,
},
Load {
message: String,
},
Plugin {
message: String,
},
}Expand description
Engine errors. A failed request never changes the document.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Stale
expectedRevision does not match.
Busy
Another interaction (drag or pending solve) is in progress.
Command
A command was rejected.
Fields
§
error: CommandErrorError.
Invalid
The resulting document would violate an invariant.
Solve
Hard rules could not be satisfied.
Fields
§
failure: SolveFailureDetails.
Validation
The independent check found a violated hard rule after solving.
Cancelled
The operation was cancelled.
NothingToUndo
Nothing to undo.
NothingToRedo
Nothing to redo.
NotActive
No interaction of the requested kind is active.
Load
Loading a document failed.
Plugin
Plugin registration failed.
Implementations§
Source§impl EngineError
impl EngineError
Trait Implementations§
Source§impl Clone for EngineError
impl Clone for EngineError
Source§fn clone(&self) -> EngineError
fn clone(&self) -> EngineError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EngineError
impl Debug for EngineError
Source§impl<'de> Deserialize<'de> for EngineError
impl<'de> Deserialize<'de> for EngineError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
1.30.0 · 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<CommandError> for EngineError
impl From<CommandError> for EngineError
Source§fn from(error: CommandError) -> Self
fn from(error: CommandError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EngineError
impl PartialEq for EngineError
Source§fn eq(&self, other: &EngineError) -> bool
fn eq(&self, other: &EngineError) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EngineError
impl Serialize for EngineError
impl StructuralPartialEq for EngineError
Auto Trait Implementations§
impl Freeze for EngineError
impl RefUnwindSafe for EngineError
impl Send for EngineError
impl Sync for EngineError
impl Unpin for EngineError
impl UnsafeUnpin for EngineError
impl UnwindSafe for EngineError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.