Enum runestick::Value [−][src]
pub enum Value {}Show 28 variants
Unit, Bool(bool), Byte(u8), Char(char), Integer(i64), Float(f64), Type(Hash), StaticString(Arc<StaticString>), String(Shared<String>), Bytes(Shared<Bytes>), Vec(Shared<Vec>), Tuple(Shared<Tuple>), Object(Shared<Object>), Range(Shared<Range>), Future(Shared<Future>), Stream(Shared<Stream>), Generator(Shared<Generator>), GeneratorState(Shared<GeneratorState>), Option(Shared<Option<Value>>), Result(Shared<Result<Value, Value>>), UnitStruct(Shared<UnitStruct>), TupleStruct(Shared<TupleStruct>), Struct(Shared<Struct>), Variant(Shared<Variant>), Function(Shared<Function>), Format(Box<Format>), Iterator(Shared<Iterator>), Any(Shared<AnyObj>),
Expand description
An entry on the stack.
Variants
The unit value.
A boolean.
Tuple Fields of Bool
0: bool
A single byte.
Tuple Fields of Byte
0: u8
A character.
Tuple Fields of Char
0: char
A number.
Tuple Fields of Integer
0: i64
A float.
Tuple Fields of Float
0: f64
A type hash. Describes a type in the virtual machine.
Tuple Fields of Type
0: Hash
A static string.
While Rc<str>
would’ve been enough to store an unsized str
, either
Box<str>
or String
must be used to reduce the size of the type to
8 bytes, to ensure that a stack value is 16 bytes in size.
Rc<str>
on the other hand wraps a so-called fat pointer, which is 16
bytes.
Tuple Fields of StaticString
0: Arc<StaticString>
A UTF-8 string.
A byte string.
A vector containing any values.
A tuple.
An object.
A range.
A stored future.
A Stream.
A stored generator.
Generator state.
Tuple Fields of GeneratorState
0: Shared<GeneratorState>
An empty value indicating nothing.
A stored result in a slot.
An struct with a well-defined type.
Tuple Fields of UnitStruct
0: Shared<UnitStruct>
A tuple with a well-defined type.
Tuple Fields of TupleStruct
0: Shared<TupleStruct>
An struct with a well-defined type.
The variant of an enum.
A stored function pointer.
A value being formatted.
An iterator.
An opaque value that can be downcasted.
Implementations
Format the value using the Protocol::STRING_DISPLAY protocol.
Also requires a work buffer buf
which will be used in case the value
provided required formatting.
Note that this function will always failed if called outside of a virtual machine.
Debug format the value using the Protocol::STRING_DEBUG protocol.
Note that this function will always failed if called outside of a virtual machine.
Convert value into an iterator using the Protocol::INTO_ITER protocol.
Note that this function will always failed if called outside of a virtual machine.
Coerce into future, or convert into a future using the Protocol::INTO_FUTURE protocol.
Note that this function will always failed if called outside of a virtual machine.
Coerce into a shared future, or convert into a future using the Protocol::INTO_FUTURE protocol.
Note that this function will always failed if called outside of a virtual machine.
Retrieves a human readable type name for the current value.
Note that this function will always failed if called outside of a virtual machine.
Construct an empty.
Construct an empty variant.
Construct a tuple variant.
Try to coerce value into an integer.
Try to coerce value into a float.
Try to coerce value into a result.
Try to coerce value into a generator.
Try to coerce value into a future.
Try to coerce value into an option.
Try to coerce value into a function pointer.
Try to coerce value into a format spec.
Try to coerce value into an iterator.
Try to coerce value into an opaque value.
Try to coerce value into a ref and an associated guard.
Safety
This coerces a strong guard to the value into its raw components.
It is up to the caller to ensure that the returned pointer does not outlive the returned guard, not the virtual machine the value belongs to.
Try to coerce value into a ref and an associated guard.
Safety
This coerces a strong guard to the value into its raw components.
It is up to the caller to ensure that the returned pointer does not outlive the returned guard, not the virtual machine the value belongs to.
Trait Implementations
Deserialize implementation for value pointers.
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Creates a value from an iterator. Read more
Try to convert to the given type, from the given value.
Serialize implementation for value pointers.
Auto Trait Implementations
impl !RefUnwindSafe for Value
impl !UnwindSafe for Value
Blanket Implementations
Mutably borrows from an owned value. Read more