pub struct State {
pub transactions: Transactions,
pub blocks: Blocks,
addresses: Addresses,
epochs: Epochs,
chain_lengths: ChainLengths,
stake_pool_data: StakePool,
stake_pool_blocks: StakePoolBlocks,
vote_plans: VotePlans,
stake_control: StakeControl,
}
Expand description
Inmutable data structure used to represent the explorer’s state at a given Block A new state can be obtained to from a Block and it’s previous state, getting two independent states but with memory sharing to minimize resource utilization
Fields§
§transactions: Transactions
§blocks: Blocks
§addresses: Addresses
§epochs: Epochs
§chain_lengths: ChainLengths
§stake_pool_data: StakePool
§stake_pool_blocks: StakePoolBlocks
§vote_plans: VotePlans
§stake_control: StakeControl
Implementations§
source§impl State
impl State
pub fn get_vote_plans(&self) -> Vec<(VotePlanId, Arc<ExplorerVotePlan>)>
pub fn get_stake_pools(&self) -> Vec<(PoolId, Arc<StakePoolData>)>
pub fn transactions_by_address( &self, address: &ExplorerAddress ) -> Option<PersistentSequence<FragmentId>>
pub fn get_block_hash_range( &self, from: ChainLength, to: ChainLength ) -> Vec<(HeaderHash, ChainLength)>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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
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