Builder

Trait Builder 

Source
pub trait Builder<T>: Sized {
    type Memory: Memory;

    // Required methods
    fn new() -> Self;
    fn add_host_func<M, F>(&mut self, module: M, field: F, f: HostFuncType<T>)
       where F: Into<Vec<u8>>,
             M: Into<Vec<u8>>;
    fn add_memory<M, F>(&mut self, module: M, field: F, mem: Self::Memory)
       where M: Into<Vec<u8>>,
             F: Into<Vec<u8>>;
}
Expand description

Inkpad environment builder

Required Associated Types§

Required Methods§

Source

fn new() -> Self

New builder

Source

fn add_host_func<M, F>(&mut self, module: M, field: F, f: HostFuncType<T>)
where F: Into<Vec<u8>>, M: Into<Vec<u8>>,

Register a host function in this environment definition

Source

fn add_memory<M, F>(&mut self, module: M, field: F, mem: Self::Memory)
where M: Into<Vec<u8>>, F: Into<Vec<u8>>,

Register a memory in this environment definition.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§