pub trait RequestStorage: Send + Sync {
// Required methods
fn get_accounts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance: &'life1 NodeState,
height: u64,
view: ViewNumber,
accounts: &'life2 [FeeAccount],
) -> Pin<Box<dyn Future<Output = Result<(FeeMerkleTree, Leaf2)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_reward_accounts_v1<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance: &'life1 NodeState,
height: u64,
view: ViewNumber,
accounts: &'life2 [RewardAccountV1],
) -> Pin<Box<dyn Future<Output = Result<(RewardMerkleTreeV1, Leaf2)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_reward_accounts_v2<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance: &'life1 NodeState,
height: u64,
view: ViewNumber,
accounts: &'life2 [RewardAccountV2],
) -> Pin<Box<dyn Future<Output = Result<(RewardMerkleTreeV2, Leaf2)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_frontier<'life0, 'life1, 'async_trait>(
&'life0 self,
instance: &'life1 NodeState,
height: u64,
view: ViewNumber,
) -> Pin<Box<dyn Future<Output = Result<BlocksFrontier>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_chain_config<'life0, 'async_trait>(
&'life0 self,
commitment: Commitment<ChainConfig>,
) -> Pin<Box<dyn Future<Output = Result<ChainConfig>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_leaf_chain<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Leaf2>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_cert2<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Certificate2<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_tree<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_vid_share<'life0, 'async_trait>(
&'life0 self,
block_number: u64,
) -> Pin<Box<dyn Future<Output = Result<VidShare>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
What a response is derived from on a SQL storage, whichever backend holds it.
Required Methods§
fn get_accounts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance: &'life1 NodeState,
height: u64,
view: ViewNumber,
accounts: &'life2 [FeeAccount],
) -> Pin<Box<dyn Future<Output = Result<(FeeMerkleTree, Leaf2)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_reward_accounts_v1<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance: &'life1 NodeState,
height: u64,
view: ViewNumber,
accounts: &'life2 [RewardAccountV1],
) -> Pin<Box<dyn Future<Output = Result<(RewardMerkleTreeV1, Leaf2)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_reward_accounts_v2<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance: &'life1 NodeState,
height: u64,
view: ViewNumber,
accounts: &'life2 [RewardAccountV2],
) -> Pin<Box<dyn Future<Output = Result<(RewardMerkleTreeV2, Leaf2)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_frontier<'life0, 'life1, 'async_trait>(
&'life0 self,
instance: &'life1 NodeState,
height: u64,
view: ViewNumber,
) -> Pin<Box<dyn Future<Output = Result<BlocksFrontier>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_chain_config<'life0, 'async_trait>(
&'life0 self,
commitment: Commitment<ChainConfig>,
) -> Pin<Box<dyn Future<Output = Result<ChainConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_leaf_chain<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Leaf2>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_cert2<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Certificate2<SeqTypes>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_tree<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".