Skip to main content

VmError

Enum VmError 

Source
pub enum VmError {
Show 52 variants InstructionLimitExceeded { limit: usize, executed: usize, pc: usize, }, TimeLimitExceeded { elapsed: Duration, limit: Duration, pc: usize, }, MemoryLimitExceeded { usage: u64, limit: u64, pc: usize, }, LiteralIndexOutOfBounds { index: u16, pc: usize, }, RegisterNotObject { register: u8, value: Value, pc: usize, }, ObjectCreateInvalidTemplate { template: Value, pc: usize, }, RegisterNotArray { register: u8, value: Value, pc: usize, }, RegisterNotSet { register: u8, value: Value, pc: usize, }, RegisterIndexOutOfBounds { index: u8, pc: usize, register_count: usize, }, RuleIndexOutOfBounds { index: u16, pc: usize, available: usize, }, RuleInfoMissing { index: u16, pc: usize, available: usize, }, InvalidObjectCreateParams { index: u16, pc: usize, available: usize, }, InvalidTemplateLiteralIndex { index: u16, pc: usize, available: usize, }, InvalidChainedIndexParams { index: u16, pc: usize, available: usize, }, InvalidArrayCreateParams { index: u16, pc: usize, available: usize, }, InvalidSetCreateParams { index: u16, pc: usize, available: usize, }, InvalidVirtualDataDocumentLookupParams { index: u16, pc: usize, available: usize, }, InvalidComprehensionBeginParams { index: u16, pc: usize, available: usize, }, InvalidLoopParams { index: u16, pc: usize, available: usize, }, InvalidRuleIndex { rule_index: Value, pc: usize, }, InvalidRuleTreeEntry { value: Value, pc: usize, }, BuiltinArgumentMismatch { expected: u16, actual: usize, pc: usize, }, BuiltinNotResolved { name: String, pc: usize, }, InvalidAddition { left: Value, right: Value, pc: usize, }, InvalidSubtraction { left: Value, right: Value, pc: usize, }, InvalidMultiplication { left: Value, right: Value, pc: usize, }, InvalidDivision { left: Value, right: Value, pc: usize, }, ModuloOnFloat { left: Value, right: Value, pc: usize, }, InvalidModulo { left: Value, right: Value, pc: usize, }, InvalidIteration { value: Value, pc: usize, }, HostAwaitResponseMissing { dest: u8, identifier: Value, pc: usize, }, AssertionFailed { pc: usize, }, RuleDataConflict { message: String, pc: usize, }, ArithmeticError { message: String, pc: usize, }, InvalidEntryPointIndex { index: usize, max_index: usize, pc: usize, }, EntryPointNotFound { name: String, available: Vec<String>, pc: usize, }, EntryPointPcOutOfBounds { pc: usize, instruction_count: usize, entry_point: String, }, RegisterCountBelowBase { register_count: usize, base_count: usize, pc: usize, }, ProgramCounterOutOfBounds { pc: usize, instruction_count: usize, }, RuleCacheSizeMismatch { cache_size: usize, rule_info_count: usize, pc: usize, }, UnsupportedSuspendInRunToCompletion { reason: SuspendReason, pc: usize, }, InvalidResumeState { state: String, pc: usize, }, MissingResumeValue { reason: SuspendReason, pc: usize, }, UnexpectedResumeValue { reason: SuspendReason, pc: usize, }, MissingExecutionFrame { context: &'static str, pc: usize, }, UnhandledInstruction { instruction: String, pc: usize, }, InvalidFunctionCallParamsIndex { index: u16, pc: usize, available: usize, }, InvalidBuiltinCallParamsIndex { index: u16, pc: usize, available: usize, }, InvalidBuiltinInfoIndex { index: u16, pc: usize, available: usize, }, RuleFrameMissingInitialPc { pc: usize, }, CallRuleStackUnderflow { pc: usize, }, Internal { message: String, pc: usize, },
}
Available on crate feature rvm only.
Expand description

VM execution errors

Variants§

§

InstructionLimitExceeded

Fields

§limit: usize
§executed: usize
§

TimeLimitExceeded

Fields

§elapsed: Duration
§limit: Duration
§

MemoryLimitExceeded

Fields

§usage: u64
§limit: u64
§

LiteralIndexOutOfBounds

Fields

§index: u16
§

RegisterNotObject

Fields

§register: u8
§value: Value
§

ObjectCreateInvalidTemplate

Fields

§template: Value
§

RegisterNotArray

Fields

§register: u8
§value: Value
§

RegisterNotSet

Fields

§register: u8
§value: Value
§

RegisterIndexOutOfBounds

Fields

§index: u8
§register_count: usize
§

RuleIndexOutOfBounds

Fields

§index: u16
§available: usize
§

RuleInfoMissing

Fields

§index: u16
§available: usize
§

InvalidObjectCreateParams

Fields

§index: u16
§available: usize
§

InvalidTemplateLiteralIndex

Fields

§index: u16
§available: usize
§

InvalidChainedIndexParams

Fields

§index: u16
§available: usize
§

InvalidArrayCreateParams

Fields

§index: u16
§available: usize
§

InvalidSetCreateParams

Fields

§index: u16
§available: usize
§

InvalidVirtualDataDocumentLookupParams

Fields

§index: u16
§available: usize
§

InvalidComprehensionBeginParams

Fields

§index: u16
§available: usize
§

InvalidLoopParams

Fields

§index: u16
§available: usize
§

InvalidRuleIndex

Fields

§rule_index: Value
§

InvalidRuleTreeEntry

Fields

§value: Value
§

BuiltinArgumentMismatch

Fields

§expected: u16
§actual: usize
§

BuiltinNotResolved

Fields

§name: String
§

InvalidAddition

Fields

§left: Value
§right: Value
§

InvalidSubtraction

Fields

§left: Value
§right: Value
§

InvalidMultiplication

Fields

§left: Value
§right: Value
§

InvalidDivision

Fields

§left: Value
§right: Value
§

ModuloOnFloat

Fields

§left: Value
§right: Value
§

InvalidModulo

Fields

§left: Value
§right: Value
§

InvalidIteration

Fields

§value: Value
§

HostAwaitResponseMissing

Fields

§dest: u8
§identifier: Value
§

AssertionFailed

Fields

§

RuleDataConflict

Fields

§message: String
§

ArithmeticError

Fields

§message: String
§

InvalidEntryPointIndex

Fields

§index: usize
§max_index: usize
§

EntryPointNotFound

Fields

§name: String
§available: Vec<String>
§

EntryPointPcOutOfBounds

Fields

§instruction_count: usize
§entry_point: String
§

RegisterCountBelowBase

Fields

§register_count: usize
§base_count: usize
§

ProgramCounterOutOfBounds

Fields

§instruction_count: usize
§

RuleCacheSizeMismatch

Fields

§cache_size: usize
§rule_info_count: usize
§

UnsupportedSuspendInRunToCompletion

Fields

§

InvalidResumeState

Fields

§state: String
§

MissingResumeValue

Fields

§

UnexpectedResumeValue

Fields

§

MissingExecutionFrame

Fields

§context: &'static str
§

UnhandledInstruction

Fields

§instruction: String
§

InvalidFunctionCallParamsIndex

Fields

§index: u16
§available: usize
§

InvalidBuiltinCallParamsIndex

Fields

§index: u16
§available: usize
§

InvalidBuiltinInfoIndex

Fields

§index: u16
§available: usize
§

RuleFrameMissingInitialPc

Fields

§

CallRuleStackUnderflow

Fields

§

Internal

Fields

§message: String

Trait Implementations§

Source§

impl Clone for VmError

Source§

fn clone(&self) -> VmError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VmError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for VmError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for VmError

1.30.0 · Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for VmError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for VmError

Source§

fn eq(&self, other: &VmError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for VmError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V