Trait oasis_contract_sdk::env::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 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§
sourcefn query<Q: Into<QueryRequest>>(&self, query: Q) -> QueryResponse
fn query<Q: Into<QueryRequest>>(&self, query: Q) -> QueryResponse
Perform an environment query.
-sourcefn address_for_instance(&self, instance_id: InstanceId) -> Address
fn address_for_instance(&self, instance_id: InstanceId) -> Address
Returns an address for the contract instance id.
+Required Methods§
sourcefn query<Q: Into<QueryRequest>>(&self, query: Q) -> QueryResponse
fn query<Q: Into<QueryRequest>>(&self, query: Q) -> QueryResponse
Perform an environment query.
+sourcefn address_for_instance(&self, instance_id: InstanceId) -> Address
fn address_for_instance(&self, instance_id: InstanceId) -> Address
Returns an address for the contract instance id.
sourcefn debug_print(&self, msg: &str)
fn debug_print(&self, msg: &str)
Prints a message to the console. Useful when debugging.
Object Safety§
Implementors§
Expand description
A contract error that gets propagated to the caller.
It extends std::error::Error
with module name and error code so that errors can be easily
serialized and transferred between different processes.