pub struct Views<S = Storage>where
S: KeyValueStorageWithColumnFamilies<ColumnFamilyIdentifier = ColumnFamilies, Error = StorageError> + Send + Sync + 'static,{ /* private fields */ }Expand description
Read-only views to read state and data from the domain.
The views are initialized by running the domain. Be sure to do that first and wait for initialization to finish (run_in_background can help for this).
Cloneable and can be shared across tasks.
Implementations§
Source§impl<S> Views<S>where
S: KeyValueStorageWithColumnFamilies<ColumnFamilyIdentifier = ColumnFamilies, Error = StorageError> + Send + Sync + 'static,
impl<S> Views<S>where
S: KeyValueStorageWithColumnFamilies<ColumnFamilyIdentifier = ColumnFamilies, Error = StorageError> + Send + Sync + 'static,
Sourcepub const fn domain_view(&self) -> &DomainStateView<Database<S>>
pub const fn domain_view(&self) -> &DomainStateView<Database<S>>
Access the domain state view
Sourcepub const fn finalized(&self) -> &FinalizedState<Database<S>, BaseLayer>
pub const fn finalized(&self) -> &FinalizedState<Database<S>, BaseLayer>
Access the finalized state
Sourcepub const fn verifiables(&self) -> &Verifiables<Database<S>>
pub const fn verifiables(&self) -> &Verifiables<Database<S>>
Access the verifiable status and data
Trait Implementations§
Source§impl<S> Clone for Views<S>where
S: KeyValueStorageWithColumnFamilies<ColumnFamilyIdentifier = ColumnFamilies, Error = StorageError> + Send + Sync + 'static,
impl<S> Clone for Views<S>where
S: KeyValueStorageWithColumnFamilies<ColumnFamilyIdentifier = ColumnFamilies, Error = StorageError> + Send + Sync + 'static,
Auto Trait Implementations§
impl<S = RocksDb<DbSpec>> !Freeze for Views<S>
impl<S = RocksDb<DbSpec>> !RefUnwindSafe for Views<S>
impl<S> Send for Views<S>
impl<S> Sync for Views<S>
impl<S> Unpin for Views<S>
impl<S = RocksDb<DbSpec>> !UnwindSafe for Views<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request