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§