Trait go_engine::ffi::Ffi

source ·
pub trait Ffi {
    // Required methods
    fn call(
        &self,
        ctx: &mut FfiCtx<'_>,
        params: Vec<GosValue, Global>
    ) -> Result<Vec<GosValue, Global>, RuntimeError>;
    fn async_call(
        &self,
        ctx: &mut FfiCtx<'_>,
        params: Vec<GosValue, Global>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<GosValue, Global>, RuntimeError>>, Global>>;
}
Expand description

A FFI Object implemented in Rust for Goscript to call

Required Methods§

source

fn call( &self, ctx: &mut FfiCtx<'_>, params: Vec<GosValue, Global> ) -> Result<Vec<GosValue, Global>, RuntimeError>

source

fn async_call( &self, ctx: &mut FfiCtx<'_>, params: Vec<GosValue, Global> ) -> Pin<Box<dyn Future<Output = Result<Vec<GosValue, Global>, RuntimeError>>, Global>>

Trait Implementations§

source§

impl Debug for dyn Ffi + 'static

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Implementors§