pub trait Pushable<'vm>: AsyncPushable<'vm> {
// Required method
fn vm_push(self, context: &mut ActiveThread<'vm>) -> Result<()>;
// Provided methods
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> { ... }
}
Expand description
Trait which allows a rust value to be pushed to the virtual machine
Required Methods§
sourcefn vm_push(self, context: &mut ActiveThread<'vm>) -> Result<()>
fn vm_push(self, context: &mut ActiveThread<'vm>) -> Result<()>
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