pub enum RuntimeError {
StackOverflow,
InvalidRegisterAccess(Register),
InvalidOperation {
kind: OperateKind,
message: String,
},
InvalidType {
expected: &'static str,
got: String,
},
InvalidArgumentCount {
expected: usize,
got: usize,
},
InvalidArgument {
index: usize,
expected: &'static str,
cause: String,
},
SymbolNotFound {
name: String,
},
Overflow,
IndexOutOfBounds {
index: i64,
length: i64,
},
KeyNotFound {
key: String,
},
Internal {
message: String,
},
InvalidOperand {
operand: Operand,
},
}Variants§
StackOverflow
InvalidRegisterAccess(Register)
InvalidOperation
InvalidType
InvalidArgumentCount
InvalidArgument
SymbolNotFound
Overflow
IndexOutOfBounds
KeyNotFound
Internal
InvalidOperand
Fields
§
operand: OperandImplementations§
Source§impl RuntimeError
impl RuntimeError
pub fn invalid_operation(kind: OperateKind, message: impl Into<String>) -> Self
pub fn invalid_type<T: Any>(got: impl Debug) -> Self
pub fn invalid_argument_count(expected: usize, got: usize) -> Self
pub fn invalid_argument<T: Any>(index: usize, got: impl Debug) -> Self
pub fn symbol_not_found(name: impl ToString) -> Self
pub fn index_out_of_bound(index: i64, length: i64) -> Self
pub fn key_not_found(key: impl Debug) -> Self
pub fn internal(message: impl ToString) -> Self
pub fn invalid_operand(operand: Operand) -> Self
Trait Implementations§
Source§impl Debug for RuntimeError
impl Debug for RuntimeError
Source§impl Display for RuntimeError
impl Display for RuntimeError
Source§impl Error for RuntimeError
impl Error for RuntimeError
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<RuntimeError> for Error
impl From<RuntimeError> for Error
Source§fn from(error: RuntimeError) -> Self
fn from(error: RuntimeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RuntimeError
impl PartialEq for RuntimeError
impl StructuralPartialEq for RuntimeError
Auto Trait Implementations§
impl Freeze for RuntimeError
impl RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl UnwindSafe for RuntimeError
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