[][src]Trait gluon_vm::api::Pushable

pub trait Pushable<'vm>: AsyncPushable<'vm> {
    fn push(self, context: &mut ActiveThread<'vm>) -> Result<()>;

    fn status_push(self, context: &mut ActiveThread<'vm>) -> Status
    where
        Self: Sized
, { ... }
unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value>
    where
        Self: Sized
, { ... }
fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>>
    where
        Self: Sized,
        T: VmRoot<'vm>
, { ... } }

Trait which allows a rust value to be pushed to the virtual machine

Required Methods

Pushes self to stack. If the call is successful a single element should have been added to the stack and Ok(()) should be returned. If the call is unsuccessful Status:Error should be returned and the stack should be left intact

Provided Methods

Implementations on Foreign Types

impl<'vm> Pushable<'vm> for ()
[src]

impl<'vm> Pushable<'vm> for u8
[src]

impl<'vm> Pushable<'vm> for i16
[src]

impl<'vm> Pushable<'vm> for i32
[src]

impl<'vm> Pushable<'vm> for i64
[src]

impl<'vm> Pushable<'vm> for u16
[src]

impl<'vm> Pushable<'vm> for u32
[src]

impl<'vm> Pushable<'vm> for u64
[src]

impl<'vm> Pushable<'vm> for usize
[src]

impl<'vm> Pushable<'vm> for isize
[src]

impl<'vm> Pushable<'vm> for f64
[src]

impl<'vm> Pushable<'vm> for bool
[src]

impl<'vm> Pushable<'vm> for Ordering
[src]

impl<'vm, 's> Pushable<'vm> for &'s String
[src]

impl<'vm, 's> Pushable<'vm> for &'s str
[src]

impl<'vm> Pushable<'vm> for String
[src]

impl<'vm> Pushable<'vm> for char
[src]

impl<'vm, 's> Pushable<'vm> for &'s PathBuf
[src]

impl<'vm, 's> Pushable<'vm> for &'s Path
[src]

impl<'vm> Pushable<'vm> for PathBuf
[src]

impl<'vm, 's> Pushable<'vm> for &'s OsString
[src]

impl<'vm, 's> Pushable<'vm> for &'s OsStr
[src]

impl<'vm> Pushable<'vm> for OsString
[src]

impl<'s, 'vm, T> Pushable<'vm> for Ref<'s, T> where
    &'t T: Pushable<'vm>,
    T: VmType
[src]

impl<'vm, 's, T> Pushable<'vm> for &'s [T] where
    T: Traverseable + Pushable<'vm> + 's,
    &'s [T]: DataDef<Value = ValueArray>, 
[src]

impl<'vm, T> Pushable<'vm> for Vec<T> where
    T: Pushable<'vm>, 
[src]

impl<'vm, K, V> Pushable<'vm> for BTreeMap<K, V> where
    K: Borrow<str> + VmType,
    K::Type: Sized,
    V: for<'vm2> Pushable<'vm2> + VmType,
    V::Type: Sized
[src]

impl<'vm, T: Pushable<'vm>> Pushable<'vm> for Option<T>
[src]

impl<'vm, T: Pushable<'vm>, E: Pushable<'vm>> Pushable<'vm> for StdResult<T, E>
[src]

impl<'vm, A, B, C, D, E, F, G, H, I, J, K, L> Pushable<'vm> for (A, B, C, D, E, F, G, H, I, J, K, L) where
    A: Pushable<'vm>,
    B: Pushable<'vm>,
    C: Pushable<'vm>,
    D: Pushable<'vm>,
    E: Pushable<'vm>,
    F: Pushable<'vm>,
    G: Pushable<'vm>,
    H: Pushable<'vm>,
    I: Pushable<'vm>,
    J: Pushable<'vm>,
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

impl<'vm, B, C, D, E, F, G, H, I, J, K, L> Pushable<'vm> for (B, C, D, E, F, G, H, I, J, K, L) where
    B: Pushable<'vm>,
    C: Pushable<'vm>,
    D: Pushable<'vm>,
    E: Pushable<'vm>,
    F: Pushable<'vm>,
    G: Pushable<'vm>,
    H: Pushable<'vm>,
    I: Pushable<'vm>,
    J: Pushable<'vm>,
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

impl<'vm, C, D, E, F, G, H, I, J, K, L> Pushable<'vm> for (C, D, E, F, G, H, I, J, K, L) where
    C: Pushable<'vm>,
    D: Pushable<'vm>,
    E: Pushable<'vm>,
    F: Pushable<'vm>,
    G: Pushable<'vm>,
    H: Pushable<'vm>,
    I: Pushable<'vm>,
    J: Pushable<'vm>,
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

impl<'vm, D, E, F, G, H, I, J, K, L> Pushable<'vm> for (D, E, F, G, H, I, J, K, L) where
    D: Pushable<'vm>,
    E: Pushable<'vm>,
    F: Pushable<'vm>,
    G: Pushable<'vm>,
    H: Pushable<'vm>,
    I: Pushable<'vm>,
    J: Pushable<'vm>,
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

impl<'vm, E, F, G, H, I, J, K, L> Pushable<'vm> for (E, F, G, H, I, J, K, L) where
    E: Pushable<'vm>,
    F: Pushable<'vm>,
    G: Pushable<'vm>,
    H: Pushable<'vm>,
    I: Pushable<'vm>,
    J: Pushable<'vm>,
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

impl<'vm, F, G, H, I, J, K, L> Pushable<'vm> for (F, G, H, I, J, K, L) where
    F: Pushable<'vm>,
    G: Pushable<'vm>,
    H: Pushable<'vm>,
    I: Pushable<'vm>,
    J: Pushable<'vm>,
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

impl<'vm, G, H, I, J, K, L> Pushable<'vm> for (G, H, I, J, K, L) where
    G: Pushable<'vm>,
    H: Pushable<'vm>,
    I: Pushable<'vm>,
    J: Pushable<'vm>,
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

impl<'vm, H, I, J, K, L> Pushable<'vm> for (H, I, J, K, L) where
    H: Pushable<'vm>,
    I: Pushable<'vm>,
    J: Pushable<'vm>,
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

impl<'vm, I, J, K, L> Pushable<'vm> for (I, J, K, L) where
    I: Pushable<'vm>,
    J: Pushable<'vm>,
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

impl<'vm, J, K, L> Pushable<'vm> for (J, K, L) where
    J: Pushable<'vm>,
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

impl<'vm, K, L> Pushable<'vm> for (K, L) where
    K: Pushable<'vm>,
    L: Pushable<'vm>, 
[src]

Implementors

impl<'__vm> Pushable<'__vm> for Value
[src]

impl<'__vm> Pushable<'__vm> for JsonString
[src]

impl<'__vm, 'a> Pushable<'__vm> for Component<'a>
[src]

impl<'s, 'value, 'vm, T, V: ?Sized> Pushable<'vm> for Opaque<T, V> where
    T: Pushable<'vm>,
    V: VmType,
    V::Type: Sized
[src]

impl<'vm> Pushable<'vm> for CPrimitive
[src]

impl<'vm> Pushable<'vm> for JsonValue
[src]

impl<'vm> Pushable<'vm> for Variants<'vm>
[src]

impl<'vm> Pushable<'vm> for RootedThread
[src]

impl<'vm, F> Pushable<'vm> for Primitive<F> where
    F: FunctionType + VmType
[src]

impl<'vm, F> Pushable<'vm> for RefPrimitive<'vm, F> where
    F: VmFunction<'vm> + FunctionType + VmType + 'vm, 
[src]

impl<'vm, T> Pushable<'vm> for Ser<T> where
    T: Serialize
[src]

impl<'vm, T> Pushable<'vm> for Collect<T> where
    T: IntoIterator,
    T::Item: Pushable<'vm>, 
[src]

impl<'vm, T> Pushable<'vm> for UserdataValue<T> where
    T: Userdata
[src]

impl<'vm, T> Pushable<'vm> for WithVM<'vm, T> where
    T: Pushable<'vm>, 
[src]

impl<'vm, T> Pushable<'vm> for RootedValue<T> where
    T: Deref<Target = Thread>, 
[src]

impl<'vm, T, F: Any> Pushable<'vm> for Function<T, F> where
    T: Deref<Target = Thread>,
    F: VmType
[src]

impl<'vm, T, R: ?Sized> Pushable<'vm> for PushAsRef<T, R> where
    T: AsRef<R>,
    &'a R: Pushable<'vm>, 
[src]

impl<'vm, T, U> Pushable<'vm> for Record<T, U> where
    U: PushableFieldList<'vm>, 
[src]

impl<'vm, T: Pushable<'vm>> Pushable<'vm> for IO<T>
[src]

impl<'vm, T: Pushable<'vm>, E: Display> Pushable<'vm> for RuntimeResult<T, E>
[src]

impl<'vm, T: Userdata> Pushable<'vm> for T
[src]

impl<'vm, T: VmType> Pushable<'vm> for TypedBytecode<T>
[src]