Skip to main content

HostRefLoader

Trait HostRefLoader 

Source
pub trait HostRefLoader<T: HostRef> {
    // Required method
    fn load(env: &HostEnv, address: Address) -> T;
}
Expand description

Trait for loading a contract from the host environment.

Similar to Deployer, but does not deploy a new contract, but loads an existing one.

Required Methods§

Source

fn load(env: &HostEnv, address: Address) -> T

Loads an existing contract from the host environment.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T: OdraContract> HostRefLoader<<T as OdraContract>::HostRef> for T

Available on non-WebAssembly only.