pub trait CheckableState {
// Required methods
fn limit_kind(&self, sell_token: &Bytes, buy_token: &Bytes) -> LimitKind;
fn check_valid(&self) -> Result<(), String>;
// Provided method
fn amounts(&self, _sell_token: &Bytes, _buy_token: &Bytes) -> Vec<BigUint> { ... }
}Expand description
What the checks ask of a state they hold, decoded or generated.
Required Methods§
Sourcefn limit_kind(&self, sell_token: &Bytes, buy_token: &Bytes) -> LimitKind
fn limit_kind(&self, sell_token: &Bytes, buy_token: &Bytes) -> LimitKind
The kind of bound get_limits(sell_token, buy_token) reports in this state.
Sourcefn check_valid(&self) -> Result<(), String>
fn check_valid(&self) -> Result<(), String>
Whether the state is one the venue can hold on chain, with what is wrong when it is not.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".