pub trait PoolStorageAccess<P: Pools> {
// Required methods
fn block_state() -> Option<P::BlockState>;
fn commit(height: u32, block_state: P::BlockState) -> Result<(), String>;
fn get(address: &String) -> Option<Pool<P::PoolState>>;
fn insert(pool: Pool<P::PoolState>);
fn remove(address: &String) -> Option<Pool<P::PoolState>>;
fn iter() -> PoolIterator<P>;
}Expand description
A trait for accessing the pool storage.
The user-defined Pools type will automatically implement this trait.
Required Methods§
fn block_state() -> Option<P::BlockState>
fn commit(height: u32, block_state: P::BlockState) -> Result<(), String>
fn get(address: &String) -> Option<Pool<P::PoolState>>
fn insert(pool: Pool<P::PoolState>)
fn remove(address: &String) -> Option<Pool<P::PoolState>>
fn iter() -> PoolIterator<P>
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.