[][src]Enum stk::ValuePtr

pub enum ValuePtr {
    None,
    Bool(bool),
    Char(char),
    Integer(i64),
    Float(f64),
    String(Slot),
    Array(Slot),
    Object(Slot),
    External(Slot),
    Type(Hash),
    Fn(Hash),
}

An entry on the stack.

Variants

None

An empty value indicating nothing.

Bool(bool)

A boolean.

Char(char)

A character.

Integer(i64)

A number.

Float(f64)

A float.

String(Slot)

A String.

Array(Slot)

An array.

Object(Slot)

An object.

External(Slot)

An external value.

Type(Hash)

A type.

Fn(Hash)

A function pointer.

Implementations

impl ValuePtr[src]

pub fn into_string(self, vm: &Vm) -> Result<Slot, StackError>[src]

Try to coerce value reference into an array.

pub fn into_array(self, vm: &Vm) -> Result<Slot, StackError>[src]

Try to coerce value reference into an array.

pub fn into_object(self, vm: &Vm) -> Result<Slot, StackError>[src]

Try to coerce value reference into an object.

pub fn into_external(self, vm: &Vm) -> Result<Slot, StackError>[src]

Try to coerce value reference into an external.

pub fn value_type(&self, vm: &Vm) -> Result<ValueType, StackError>[src]

Get the type information for the current value.

pub fn type_info(&self, vm: &Vm) -> Result<ValueTypeInfo, StackError>[src]

Get the type information for the current value.

Trait Implementations

impl Clone for ValuePtr[src]

impl Copy for ValuePtr[src]

impl Debug for ValuePtr[src]

impl Default for ValuePtr[src]

impl<'de> Deserialize<'de> for ValuePtr[src]

Deserialize implementation for value pointers.

Warning: This only works if a Vm is accessible through tls, like by being set up with tls::inject_vm or tls::InjectVm.

impl FromValue for ValuePtr[src]

impl PartialEq<ValuePtr> for ValuePtr[src]

impl Serialize for ValuePtr[src]

Serialize implementation for value pointers.

Warning: This only works if a Vm is accessible through tls, like by being set up with tls::inject_vm or tls::InjectVm.

impl StructuralPartialEq for ValuePtr[src]

impl ToValue for ValuePtr[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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