Module runtime

Source
Expand description

Runtime module for Rune.

Re-exports§

pub use self::debug::DebugInfo;
pub use self::debug::DebugInst;
pub use self::format::Format;
pub use self::format::FormatSpec;
pub use self::unit::Unit;
pub use self::unit::UnitStorage;
pub use self::value::Accessor;
pub use self::value::TypeValue;
pub use self::vm_error::try_result;
pub use self::vm_error::TryFromResult;

Modules§

budget
Budgeting module for Runestick.
debug
Debug information for units.
format
Types for dealing with formatting specifications.
slice
Types for working with slices.
unit
A single execution unit in the rune virtual machine.

Structs§

AccessError
An error raised when failing to access a value.
AnyObj
A type-erased wrapper for a reference, whether it is mutable or not.
AnyObjError
Errors caused when accessing or coercing an AnyObj.
AnyTypeInfo
Type information for the Any type.
BorrowMut
Guard for data exclusively borrowed from a slot in the virtual machine.
BorrowRef
Guard for a data borrowed from a slot in the virtual machine.
Bytes
A vector of bytes.
CallFrame
A call frame.
ConstValue
A constant value.
DebugLabel
A label that can be jumped to.
DynamicEmpty
A reference to a dynamically defined empty type.
DynamicStruct
A reference to a dynamically defined struct.
DynamicTuple
A reference to a dynamically defined tuple.
EmptyStruct
A empty with a well-defined type.
Formatter
A formatter for the rune virtual machine.
Function
The type of a function in Rune.
Future
A type-erased future that can only be unsafely polled in combination with the virtual machine that created it.
Generator
A generator produced by a generator function.
Hasher
The default hasher used in Rune.
InstAddress
How an instruction addresses a value.
Iterator
An owning iterator.
Mut
A strong owned mutable reference to the given type that can be safely dereferenced.
Object
Struct representing a dynamic anonymous object.
Output
What to do with the output of an instruction.
OwnedTuple
Struct representing a dynamic anonymous object.
Protocol
A built in instance function.
Range
Type for a range expression start..end.
RangeFrom
Type for a from range expression start...
RangeFull
Type for a full range expression ...
RangeInclusive
Type for an inclusive range expression start..=end.
RangeTo
Type for an inclusive range expression ..end.
RangeToInclusive
Type for an inclusive range expression ..=end.
RawAnyGuard
A raw guard for a Ref or a Mut that has been converted into its raw components through Ref::into_raw or Mut::into_raw.
RawValueGuard
The guard returned by Value::into_any_mut_ptr.
Ref
A strong owned reference to the given type that can be safely dereferenced.
Rtti
Runtime information on variant.
RuntimeContext
Static run context visible to the virtual machine.
RuntimeError
An opaque simple runtime error.
SliceError
An error raised when accessing a slice on the stack.
Stack
The stack of the virtual machine, where all values are stored.
StackError
An error raised when accessing an address on the stack.
StaticString
Struct representing a static string.
Stream
A stream produced by an async generator function.
Struct
An object with a well-defined type.
SyncFunction
A callable sync function. This currently only supports a subset of values that are supported by the Vm.
Tuple
The type of a tuple slice.
TupleStruct
A tuple with a well-defined type.
Type
A value representing a type in the virtual machine.
TypeInfo
Diagnostical type information for a given type.
Value
An entry on the stack.
ValueMutGuard
Defined guard for a reference value.
ValueRefGuard
Defined guard for a reference value.
Vec
Struct representing a dynamic vector.
VecTuple
A helper type to deserialize arrays with different interior types.
Vm
A stack which references variables indirectly from a slab.
VmError
A virtual machine error which includes tracing information.
VmExecution
The execution environment for a virtual machine.
VmSendExecution
A wrapper that makes VmExecution Send.

Enums§

Call
The calling convention of a function.
ControlFlow
Used to tell an operation whether it should exit early or go on as usual.
GeneratorState
The state of a generator.
Inline
An inline value.
Inst
An operation in the stack-based virtual machine.
InstArithmeticOp
An operation between two values on the machine.
InstBitwiseOp
An operation between two values on the machine.
InstOp
An operation between two values on the machine.
InstRange
Range limits of a range expression.
InstShiftOp
An operation between two values on the machine.
InstTarget
The target of an operation.
InstValue
A literal value that can be pushed.
InstVariant
A variant that can be constructed.
Isolated
Indicating the kind of isolation that is present for a frame.
PanicReason
Pre-canned panic reasons.
TypeCheck
Type checks for built-in types.
VmResult
A result produced by the virtual machine.

Traits§

Args
Trait for converting arguments onto the stack.
ConstConstruct
Implementation of a constant constructor.
FixedArgs
Trait for converting arguments into an array.
FromConstValue
Convert a value from a constant value.
FromValue
Trait for converting types from the dynamic Value container.
GuardedArgs
Trait for converting arguments onto the stack.
IntoOutput
Trait used to coerce values into outputs.
MaybeTypeOf
A type that might or might not have a concrete type.
Memory
Memory access.
ToConstValue
Convert a value into a constant value.
ToReturn
Trait governing things that can be returned from native functions.
ToValue
Trait for converting types into the dynamic Value container.
TypeHash
Static type hash for a given type.
TypeOf
Trait used for Rust types for which we can determine the runtime type of.
UnsafeFromValueDeprecated
A potentially unsafe conversion for value conversion.
UnsafeToMut
Unsafe to mut coercion.
UnsafeToRef
Unsafe to ref coercion.
UnsafeToValue
Trait for converting types into values.

Functions§

bytes_slice_index_get
This is a common index get implementation that is helpfull for custom type to impl INDEX_GET protocol.
from_const_value
Convert something into a ConstValue.
from_value
Convert something into the dynamic Value.
to_const_value
Convert something into a ConstValue.
to_value
Convert something into the dynamic Value.

Derive Macros§

FromValue
Derive macro for the FromValue trait for converting types from the dynamic Value container.
ToConstValue
Derive for the ToConstValue trait.
ToValue
Derive macro for the ToValue trait for converting types into the dynamic Value container.