pub trait StateExt {
// Required methods
fn state_write(
self: &&mut Self,
method_context: &MethodContext,
contract: &Address,
contract_state: &Address,
new_state: &VariableBytes<MAX_STATE_SIZE>,
) -> Result<(), ContractError>;
fn state_read(
&self,
contract: &Address,
contract_state: &Address,
state: &mut VariableBytes<MAX_STATE_SIZE>,
) -> Result<(), ContractError>;
fn state_is_empty(
&self,
contract: &Address,
contract_state: &Address,
) -> Result<bool, ContractError>;
}
Expand description
Required Methods§
fn state_write( self: &&mut Self, method_context: &MethodContext, contract: &Address, contract_state: &Address, new_state: &VariableBytes<MAX_STATE_SIZE>, ) -> Result<(), ContractError>
fn state_read( &self, contract: &Address, contract_state: &Address, state: &mut VariableBytes<MAX_STATE_SIZE>, ) -> Result<(), ContractError>
fn state_is_empty( &self, contract: &Address, contract_state: &Address, ) -> Result<bool, ContractError>
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.