Enum yksom::vm::error::VMErrorKind [−][src]
pub enum VMErrorKind {}Show variants
BuiltinTypeError { expected: ObjType, got: ObjType, }, CantRepresentAsDouble, CantRepresentAsIsize, CantRepresentAsUsize, DivisionByZero, DomainError, Exit(i32), IndexError { tried: usize, max: usize, }, InstanceTypeError { expected_cls: Val, got_cls: Val, }, InvalidDouble(SmartString), InvalidInteger(SmartString), InvalidSymbol, NegativeShift, NotANumber { got: ObjType, }, PrimitiveError, RemainderError, ShiftTooBig, UnknownGlobal(SmartString), UnknownMethod, WrongNumberOfArgs { wanted: usize, got: usize, },
Variants
We expected a Rust type expected
but at run-time got a Rust type got
.
A value which can’t be represented in an f64
.
A value which can’t be represented in an isize
.
A value which can’t be represented in an usize
.
A value which is mathematically undefined.
Exit(i32)
The VM is trying to exit.
Tried to access an out-of-bounds element.
We expected a SOM value that is an instance of expected_cls
but at run-time got a SOM
value that is an instance of got_cls
.
Tried to convert an invalid string to a Double.
Tried to convert an invalid string to an Integer.
Tried to access a global before it being initialised.
Tried to do a shl or shr with a value below zero.
A specialised version of TypeError, because SOM has more than one number type (and casts
between them as necessary) so the expected
field of TypeError
doesn’t quite work.
Fields of NotANumber
got: ObjType
Something went wrong when trying to execute a primitive.
Tried to calculate a remainder that was a divide by zero or resulted in overflow.
Tried to do a shl that would overflow memory and/or not fit in the required integer size.
An unknown global.
An unknown method.
Tried calling a method with the wrong number of arguments.
Trait Implementations
impl Debug for VMErrorKind
[src]
impl PartialEq<VMErrorKind> for VMErrorKind
[src]
fn eq(&self, other: &VMErrorKind) -> bool
[src]
fn ne(&self, other: &VMErrorKind) -> bool
[src]
impl StructuralPartialEq for VMErrorKind
[src]
Auto Trait Implementations
impl !NoTrace for VMErrorKind
impl RefUnwindSafe for VMErrorKind
impl Send for VMErrorKind
impl Sync for VMErrorKind
impl Unpin for VMErrorKind
impl UnwindSafe for VMErrorKind
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,
pub 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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,