NodeStorage

Trait NodeStorage 

Source
pub trait NodeStorage<Types>
where Types: NodeType, Header<Types>: QueryableHeader<Types>,
{ // Required methods fn block_height<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = QueryResult<usize>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn count_transactions_in_range<'life0, 'async_trait>( &'life0 mut self, range: impl 'async_trait + RangeBounds<usize> + Send, namespace: Option<NamespaceId<Types>>, ) -> Pin<Box<dyn Future<Output = QueryResult<usize>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn payload_size_in_range<'life0, 'async_trait>( &'life0 mut self, range: impl 'async_trait + RangeBounds<usize> + Send, namespace: Option<NamespaceId<Types>>, ) -> Pin<Box<dyn Future<Output = QueryResult<usize>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn vid_share<'life0, 'async_trait, ID>( &'life0 mut self, id: ID, ) -> Pin<Box<dyn Future<Output = QueryResult<VidShare>> + Send + 'async_trait>> where ID: Into<BlockId<Types>> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn get_header_window<'life0, 'async_trait>( &'life0 mut self, start: impl 'async_trait + Into<WindowStart<Types>> + Send + Sync, end: u64, limit: usize, ) -> Pin<Box<dyn Future<Output = QueryResult<TimeWindowQueryData<Header<Types>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn latest_qc_chain<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = QueryResult<Option<[CertificatePair<Types>; 2]>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_status_for_range<'life0, 'async_trait>( &'life0 mut self, from: usize, to: usize, ) -> Pin<Box<dyn Future<Output = QueryResult<SyncStatusQueryData>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; }

Required Methods§

Source

fn block_height<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = QueryResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn count_transactions_in_range<'life0, 'async_trait>( &'life0 mut self, range: impl 'async_trait + RangeBounds<usize> + Send, namespace: Option<NamespaceId<Types>>, ) -> Pin<Box<dyn Future<Output = QueryResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn payload_size_in_range<'life0, 'async_trait>( &'life0 mut self, range: impl 'async_trait + RangeBounds<usize> + Send, namespace: Option<NamespaceId<Types>>, ) -> Pin<Box<dyn Future<Output = QueryResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn vid_share<'life0, 'async_trait, ID>( &'life0 mut self, id: ID, ) -> Pin<Box<dyn Future<Output = QueryResult<VidShare>> + Send + 'async_trait>>
where ID: Into<BlockId<Types>> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_header_window<'life0, 'async_trait>( &'life0 mut self, start: impl 'async_trait + Into<WindowStart<Types>> + Send + Sync, end: u64, limit: usize, ) -> Pin<Box<dyn Future<Output = QueryResult<TimeWindowQueryData<Header<Types>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn latest_qc_chain<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = QueryResult<Option<[CertificatePair<Types>; 2]>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn sync_status_for_range<'life0, 'async_trait>( &'life0 mut self, from: usize, to: usize, ) -> Pin<Box<dyn Future<Output = QueryResult<SyncStatusQueryData>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Search the given range of the database for missing objects.

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.

Implementors§

Source§

impl<Mode, Types> NodeStorage<Types> for hotshot_query_service::data_source::storage::sql::Transaction<Mode>
where Mode: TransactionMode, Types: NodeType, Header<Types>: QueryableHeader<Types>,

Source§

impl<Types, T> NodeStorage<Types> for hotshot_query_service::data_source::storage::fail_storage::Transaction<T>
where Types: NodeType, Header<Types>: QueryableHeader<Types>, T: NodeStorage<Types> + Send + Sync,

Source§

impl<Types, T> NodeStorage<Types> for hotshot_query_service::data_source::storage::fs::Transaction<T>
where Types: NodeType, Payload<Types>: QueryablePayload<Types>, Header<Types>: QueryableHeader<Types>, T: Revert + Deref<Target = FileSystemStorageInner<Types>> + Send + Sync,