Skip to main content

MyWorldImports

Trait MyWorldImports 

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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§