Trait NodeDataSource

Source
pub trait NodeDataSource<Types>
where Types: NodeType, Header<Types>: QueryableHeader<Types>,
{ // Required methods fn block_height<'life0, 'async_trait>( &'life0 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 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 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 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 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 sync_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = QueryResult<SyncStatus>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn count_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = QueryResult<usize>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn payload_size<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = QueryResult<usize>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } }

Required Methods§

Source

fn block_height<'life0, 'async_trait>( &'life0 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 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 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 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 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 sync_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = QueryResult<SyncStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Search the database for missing objects and generate a report.

Provided Methods§

Source

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

Source

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

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<D, U, Types> NodeDataSource<Types> for ExtensibleDataSource<D, U>
where D: NodeDataSource<Types> + Send + Sync, U: Send + Sync, Types: NodeType, Header<Types>: QueryableHeader<Types>,

Source§

impl<Types, S, P> NodeDataSource<Types> for FetchingDataSource<Types, S, P>
where Types: NodeType, Header<Types>: QueryableHeader<Types>, S: VersionedDataSource + 'static, for<'a> S::ReadOnly<'a>: NodeStorage<Types>, P: Send + Sync,