wasmtime::component::bindgen_examples::_1_world_imports

Trait MyWorldImports

Source
pub trait MyWorldImports {
    // Required methods
    fn greet(&mut self) -> String;
    fn log(&mut self, msg: String);
}
Available on crate feature runtime and crate feature component-model and docsrs only.

Required Methods§

Source

fn greet(&mut self) -> String

Fetch a greeting to present.

Source

fn log(&mut self, msg: String)

Log a message to the host.

Implementations on Foreign Types§

Source§

impl<_T: MyWorldImports + ?Sized> MyWorldImports for &mut _T

Source§

fn greet(&mut self) -> String

Fetch a greeting to present.

Source§

fn log(&mut self, msg: String)

Log a message to the host.

Implementors§