Trait Env

Source
pub trait Env {
    // Required methods
    fn query<Q: Into<QueryRequest>>(&self, query: Q) -> QueryResponse;
    fn address_for_instance(&self, instance_id: InstanceId) -> Address;
    fn debug_print(&self, msg: &str);
}
Expand description

Environment query trait.

Required Methods§

Source

fn query<Q: Into<QueryRequest>>(&self, query: Q) -> QueryResponse

Perform an environment query.

Source

fn address_for_instance(&self, instance_id: InstanceId) -> Address

Returns an address for the contract instance id.

Source

fn debug_print(&self, msg: &str)

Prints a message to the console. Useful when debugging.

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§