pub enum Error {
ExecutionError(String),
IndexOutOfBounds {
index: usize,
len: usize,
},
RuntimeError(String),
StateError(StateError),
TransformationError(String),
TypeError(String),
Unknown(String),
}
Variants§
ExecutionError(String)
IndexOutOfBounds
RuntimeError(String)
StateError(StateError)
TransformationError(String)
TypeError(String)
Unknown(String)
Implementations§
Source§impl Error
impl Error
pub fn execution_error(field_0: String) -> Self
pub fn index_out_of_bounds(index: usize, len: usize) -> Self
pub fn runtime_error(field_0: String) -> Self
pub fn state_error(field_0: StateError) -> Self
pub fn transformation_error(field_0: String) -> Self
pub fn type_error(field_0: String) -> Self
pub fn unknown(field_0: String) -> Self
Source§impl Error
impl Error
Sourcepub const fn is_execution_error(&self) -> bool
pub const fn is_execution_error(&self) -> bool
Returns true if the enum is Error::ExecutionError otherwise false
Sourcepub const fn is_index_out_of_bounds(&self) -> bool
pub const fn is_index_out_of_bounds(&self) -> bool
Returns true if the enum is Error::IndexOutOfBounds otherwise false
Sourcepub const fn is_runtime_error(&self) -> bool
pub const fn is_runtime_error(&self) -> bool
Returns true if the enum is Error::RuntimeError otherwise false
Sourcepub const fn is_state_error(&self) -> bool
pub const fn is_state_error(&self) -> bool
Returns true if the enum is Error::StateError otherwise false
Sourcepub const fn is_transformation_error(&self) -> bool
pub const fn is_transformation_error(&self) -> bool
Returns true if the enum is Error::TransformationError otherwise false
Sourcepub const fn is_type_error(&self) -> bool
pub const fn is_type_error(&self) -> bool
Returns true if the enum is Error::TypeError otherwise false
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true if the enum is Error::Unknown otherwise false
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
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 Error for Error
impl Error for Error
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<'_enum> From<&'_enum Error> for ErrorDiscriminants
impl<'_enum> From<&'_enum Error> for ErrorDiscriminants
Source§fn from(val: &'_enum Error) -> ErrorDiscriminants
fn from(val: &'_enum Error) -> ErrorDiscriminants
Converts to this type from the input type.
Source§impl From<Error> for ErrorDiscriminants
impl From<Error> for ErrorDiscriminants
Source§fn from(val: Error) -> ErrorDiscriminants
fn from(val: Error) -> ErrorDiscriminants
Converts to this type from the input type.
Source§impl From<StateError> for Error
impl From<StateError> for Error
Source§fn from(source: StateError) -> Self
fn from(source: StateError) -> Self
Converts to this type from the input type.
Source§impl IntoDiscriminant for Error
impl IntoDiscriminant for Error
Source§type Discriminant = ErrorDiscriminants
type Discriminant = ErrorDiscriminants
Enum listing the same variants as this enum but without any data fields
fn discriminant(&self) -> Self::Discriminant
Source§impl Ord for Error
impl Ord for Error
Source§impl PartialOrd for Error
impl PartialOrd for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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