Trait Ffi

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

A FFI Object implemented in Rust for Goscript to call

Required Methods§

Source

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

Source

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

Trait Implementations§

Source§

impl Debug for dyn Ffi

Source§

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

Formats the value using the given formatter. Read more

Implementors§