pub struct State {Show 13 fields
pub config: GlobalConfig,
pub p2p: P2p,
pub ledger: LedgerState,
pub snark: SnarkState,
pub transition_frontier: TransitionFrontierState,
pub snark_pool: SnarkPoolState,
pub external_snark_worker: ExternalSnarkWorkers,
pub transaction_pool: TransactionPoolState,
pub block_producer: BlockProducerState,
pub rpc: RpcState,
pub watched_accounts: WatchedAccountsState,
last_action: ActionMeta,
applied_actions_count: u64,
}
Fields§
§config: GlobalConfig
§p2p: P2p
§ledger: LedgerState
§snark: SnarkState
§transition_frontier: TransitionFrontierState
§snark_pool: SnarkPoolState
§external_snark_worker: ExternalSnarkWorkers
§transaction_pool: TransactionPoolState
§block_producer: BlockProducerState
§rpc: RpcState
§watched_accounts: WatchedAccountsState
§last_action: ActionMeta
§applied_actions_count: u64
Implementations§
Source§impl State
impl State
pub fn new( config: Config, constants: &ConsensusConstants, now: Timestamp, ) -> Self
pub fn last_action(&self) -> &ActionMeta
Sourcepub fn time(&self) -> Timestamp
pub fn time(&self) -> Timestamp
Latest time observed by the state machine.
Only updated when action is dispatched and reducer is executed.
pub fn pseudo_rng(&self) -> StdRng
Sourcepub fn action_applied(&mut self, action: &ActionWithMeta)
pub fn action_applied(&mut self, action: &ActionWithMeta)
Must be called in the global reducer as the last thing only once and only there!
pub fn genesis_block(&self) -> Option<ArcBlockWithHash>
fn cur_slot( &self, initial_slot: impl FnOnce(&ArcBlockWithHash) -> u32, ) -> Option<u32>
Sourcepub fn cur_global_slot(&self) -> Option<u32>
pub fn cur_global_slot(&self) -> Option<u32>
Current global slot based on constants and current time.
It’s not equal to global slot of the best tip.
pub fn current_slot(&self) -> Option<u32>
pub fn cur_global_slot_since_genesis(&self) -> Option<u32>
pub fn current_epoch(&self) -> Option<u32>
pub fn slot_time(&self, global_slot: u64) -> Option<(Timestamp, Timestamp)>
pub fn producing_block_after_genesis(&self) -> bool
pub fn prevalidate_block( &self, block: &ArcBlockWithHash, allow_block_too_late: bool, ) -> Result<(), BlockPrevalidationError>
pub fn should_log_node_id(&self) -> bool
pub fn consensus_time_now(&self) -> Option<ConsensusTime>
pub fn consensus_time_best_tip(&self) -> Option<ConsensusTime>
Source§impl State
impl State
pub fn p2p_callback_reducer( state_context: Substate<'_, Self>, action: ActionWithMeta<&P2pCallbacksAction>, )
fn handle_rpc_channels_request( dispatcher: &mut Dispatcher<Action, State>, state: &State, meta: ActionMeta, request: P2pRpcRequest, peer_id: PeerId, id: u64, )
fn handle_rpc_channels_response<'a>( dispatcher: &mut Dispatcher<Action, State>, meta: ActionMeta, id: u64, peer_id: PeerId, request: impl FnOnce() -> Option<&'a P2pRpcRequest>, response: &Option<Box<P2pRpcResponse>>, )
Trait Implementations§
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EnablingCondition<State> for BlockProducerAction
impl EnablingCondition<State> for BlockProducerAction
Source§impl EnablingCondition<State> for BlockProducerEffectfulAction
impl EnablingCondition<State> for BlockProducerEffectfulAction
Source§impl EnablingCondition<State> for BlockProducerVrfEvaluatorAction
impl EnablingCondition<State> for BlockProducerVrfEvaluatorAction
Source§impl EnablingCondition<State> for BlockProducerVrfEvaluatorEffectfulAction
impl EnablingCondition<State> for BlockProducerVrfEvaluatorEffectfulAction
Source§impl EnablingCondition<State> for CheckTimeoutsAction
impl EnablingCondition<State> for CheckTimeoutsAction
§fn is_enabled(&self, state: &State, time: Timestamp) -> bool
fn is_enabled(&self, state: &State, time: Timestamp) -> bool
Enabling condition for the Action. Read more
Source§impl EnablingCondition<State> for EventSourceAction
impl EnablingCondition<State> for EventSourceAction
Source§impl EnablingCondition<State> for ExternalSnarkWorkerAction
impl EnablingCondition<State> for ExternalSnarkWorkerAction
Source§impl EnablingCondition<State> for ExternalSnarkWorkerEffectfulAction
impl EnablingCondition<State> for ExternalSnarkWorkerEffectfulAction
Source§impl EnablingCondition<State> for LedgerAction
impl EnablingCondition<State> for LedgerAction
Source§impl EnablingCondition<State> for LedgerEffectfulAction
impl EnablingCondition<State> for LedgerEffectfulAction
Source§impl EnablingCondition<State> for LedgerReadAction
impl EnablingCondition<State> for LedgerReadAction
Source§impl EnablingCondition<State> for LedgerWriteAction
impl EnablingCondition<State> for LedgerWriteAction
Source§impl EnablingCondition<State> for P2pCallbacksAction
impl EnablingCondition<State> for P2pCallbacksAction
Source§impl EnablingCondition<State> for P2pChannelsBestTipAction
impl EnablingCondition<State> for P2pChannelsBestTipAction
Source§impl EnablingCondition<State> for P2pChannelsMessageReceivedAction
impl EnablingCondition<State> for P2pChannelsMessageReceivedAction
Source§impl EnablingCondition<State> for P2pChannelsRpcAction
impl EnablingCondition<State> for P2pChannelsRpcAction
Source§impl EnablingCondition<State> for P2pChannelsSignalingDiscoveryAction
impl EnablingCondition<State> for P2pChannelsSignalingDiscoveryAction
Source§impl EnablingCondition<State> for P2pChannelsSignalingExchangeAction
impl EnablingCondition<State> for P2pChannelsSignalingExchangeAction
Source§impl EnablingCondition<State> for P2pChannelsSnarkAction
impl EnablingCondition<State> for P2pChannelsSnarkAction
Source§impl EnablingCondition<State> for P2pChannelsSnarkJobCommitmentAction
impl EnablingCondition<State> for P2pChannelsSnarkJobCommitmentAction
Source§impl EnablingCondition<State> for P2pChannelsStreamingRpcAction
impl EnablingCondition<State> for P2pChannelsStreamingRpcAction
Source§impl EnablingCondition<State> for P2pChannelsTransactionAction
impl EnablingCondition<State> for P2pChannelsTransactionAction
Source§impl EnablingCondition<State> for P2pConnectionIncomingAction
impl EnablingCondition<State> for P2pConnectionIncomingAction
Source§impl EnablingCondition<State> for P2pConnectionOutgoingAction
impl EnablingCondition<State> for P2pConnectionOutgoingAction
Source§impl EnablingCondition<State> for P2pDisconnectionAction
impl EnablingCondition<State> for P2pDisconnectionAction
Source§impl EnablingCondition<State> for P2pInitializeAction
impl EnablingCondition<State> for P2pInitializeAction
Source§impl EnablingCondition<State> for P2pNetworkIdentifyAction
impl EnablingCondition<State> for P2pNetworkIdentifyAction
Source§impl EnablingCondition<State> for P2pNetworkIdentifyStreamAction
impl EnablingCondition<State> for P2pNetworkIdentifyStreamAction
Source§impl EnablingCondition<State> for P2pNetworkKadBootstrapAction
impl EnablingCondition<State> for P2pNetworkKadBootstrapAction
Source§impl EnablingCondition<State> for P2pNetworkKadRequestAction
impl EnablingCondition<State> for P2pNetworkKadRequestAction
Source§impl EnablingCondition<State> for P2pNetworkKademliaAction
impl EnablingCondition<State> for P2pNetworkKademliaAction
Source§impl EnablingCondition<State> for P2pNetworkKademliaStreamAction
impl EnablingCondition<State> for P2pNetworkKademliaStreamAction
Source§impl EnablingCondition<State> for P2pNetworkNoiseAction
impl EnablingCondition<State> for P2pNetworkNoiseAction
Source§impl EnablingCondition<State> for P2pNetworkPnetAction
impl EnablingCondition<State> for P2pNetworkPnetAction
Source§impl EnablingCondition<State> for P2pNetworkPubsubAction
impl EnablingCondition<State> for P2pNetworkPubsubAction
Source§impl EnablingCondition<State> for P2pNetworkRpcAction
impl EnablingCondition<State> for P2pNetworkRpcAction
Source§impl EnablingCondition<State> for P2pNetworkSchedulerAction
impl EnablingCondition<State> for P2pNetworkSchedulerAction
Source§impl EnablingCondition<State> for P2pNetworkSchedulerEffectfulAction
impl EnablingCondition<State> for P2pNetworkSchedulerEffectfulAction
Source§impl EnablingCondition<State> for P2pNetworkSelectAction
impl EnablingCondition<State> for P2pNetworkSelectAction
Source§impl EnablingCondition<State> for P2pNetworkYamuxAction
impl EnablingCondition<State> for P2pNetworkYamuxAction
Source§impl EnablingCondition<State> for P2pPeerAction
impl EnablingCondition<State> for P2pPeerAction
Source§impl EnablingCondition<State> for RpcEffectfulAction
impl EnablingCondition<State> for RpcEffectfulAction
Source§impl EnablingCondition<State> for SnarkPoolAction
impl EnablingCondition<State> for SnarkPoolAction
Source§impl EnablingCondition<State> for SnarkPoolCandidateAction
impl EnablingCondition<State> for SnarkPoolCandidateAction
Source§impl EnablingCondition<State> for SnarkPoolEffectfulAction
impl EnablingCondition<State> for SnarkPoolEffectfulAction
Source§impl EnablingCondition<State> for SnarkUserCommandVerifyAction
impl EnablingCondition<State> for SnarkUserCommandVerifyAction
Source§impl EnablingCondition<State> for TransactionPoolAction
impl EnablingCondition<State> for TransactionPoolAction
Source§impl EnablingCondition<State> for TransactionPoolCandidateAction
impl EnablingCondition<State> for TransactionPoolCandidateAction
Source§impl EnablingCondition<State> for TransactionPoolEffectfulAction
impl EnablingCondition<State> for TransactionPoolEffectfulAction
§fn is_enabled(&self, state: &State, time: Timestamp) -> bool
fn is_enabled(&self, state: &State, time: Timestamp) -> bool
Enabling condition for the Action. Read more
Source§impl EnablingCondition<State> for TransitionFrontierAction
impl EnablingCondition<State> for TransitionFrontierAction
Source§impl EnablingCondition<State> for TransitionFrontierCandidateAction
impl EnablingCondition<State> for TransitionFrontierCandidateAction
Source§impl EnablingCondition<State> for TransitionFrontierGenesisAction
impl EnablingCondition<State> for TransitionFrontierGenesisAction
Source§impl EnablingCondition<State> for TransitionFrontierGenesisEffectfulAction
impl EnablingCondition<State> for TransitionFrontierGenesisEffectfulAction
Source§impl EnablingCondition<State> for TransitionFrontierSyncAction
impl EnablingCondition<State> for TransitionFrontierSyncAction
Source§impl EnablingCondition<State> for TransitionFrontierSyncLedgerAction
impl EnablingCondition<State> for TransitionFrontierSyncLedgerAction
Source§impl EnablingCondition<State> for TransitionFrontierSyncLedgerSnarkedAction
impl EnablingCondition<State> for TransitionFrontierSyncLedgerSnarkedAction
Source§impl EnablingCondition<State> for TransitionFrontierSyncLedgerStagedAction
impl EnablingCondition<State> for TransitionFrontierSyncLedgerStagedAction
Source§impl EnablingCondition<State> for WatchedAccountsAction
impl EnablingCondition<State> for WatchedAccountsAction
Source§impl<S> SubStore<State, P2pState> for Store<S>where
S: Service,
impl<S> SubStore<State, P2pState> for Store<S>where
S: Service,
type SubAction = P2pAction
type Service = S
fn state(&self) -> &P2pState
fn service(&mut self) -> &mut Self::Service
fn state_and_service(&mut self) -> (&P2pState, &mut Self::Service)
fn dispatch<A>(&mut self, action: A) -> bool
fn dispatch_callback<T>(&mut self, callback: Callback<T>, args: T) -> bool
Source§impl<S> SubStore<State, SnarkState> for Store<S>where
S: Service,
impl<S> SubStore<State, SnarkState> for Store<S>where
S: Service,
type SubAction = SnarkAction
type Service = S
fn state(&self) -> &SnarkState
fn service(&mut self) -> &mut Self::Service
fn state_and_service(&mut self) -> (&SnarkState, &mut Self::Service)
fn dispatch<A>(&mut self, action: A) -> bool
fn dispatch_callback<T>(&mut self, callback: Callback<T>, args: T) -> bool
Source§impl SubstateAccess<BlockProducerState> for State
impl SubstateAccess<BlockProducerState> for State
Source§fn substate(&self) -> SubstateResult<&BlockProducerState>
fn substate(&self) -> SubstateResult<&BlockProducerState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut BlockProducerState>
fn substate_mut(&mut self) -> SubstateResult<&mut BlockProducerState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<BlockProducerVrfEvaluatorState> for State
impl SubstateAccess<BlockProducerVrfEvaluatorState> for State
Source§fn substate(&self) -> SubstateResult<&BlockProducerVrfEvaluatorState>
fn substate(&self) -> SubstateResult<&BlockProducerVrfEvaluatorState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(
&mut self,
) -> SubstateResult<&mut BlockProducerVrfEvaluatorState>
fn substate_mut( &mut self, ) -> SubstateResult<&mut BlockProducerVrfEvaluatorState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<ExternalSnarkWorker> for State
impl SubstateAccess<ExternalSnarkWorker> for State
Source§fn substate(&self) -> SubstateResult<&ExternalSnarkWorker>
fn substate(&self) -> SubstateResult<&ExternalSnarkWorker>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut ExternalSnarkWorker>
fn substate_mut(&mut self) -> SubstateResult<&mut ExternalSnarkWorker>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<ExternalSnarkWorkers> for State
impl SubstateAccess<ExternalSnarkWorkers> for State
Source§fn substate(&self) -> SubstateResult<&ExternalSnarkWorkers>
fn substate(&self) -> SubstateResult<&ExternalSnarkWorkers>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut ExternalSnarkWorkers>
fn substate_mut(&mut self) -> SubstateResult<&mut ExternalSnarkWorkers>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<LedgerReadState> for State
impl SubstateAccess<LedgerReadState> for State
Source§fn substate(&self) -> SubstateResult<&LedgerReadState>
fn substate(&self) -> SubstateResult<&LedgerReadState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut LedgerReadState>
fn substate_mut(&mut self) -> SubstateResult<&mut LedgerReadState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<LedgerState> for State
impl SubstateAccess<LedgerState> for State
Source§fn substate(&self) -> SubstateResult<&LedgerState>
fn substate(&self) -> SubstateResult<&LedgerState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut LedgerState>
fn substate_mut(&mut self) -> SubstateResult<&mut LedgerState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<LedgerWriteState> for State
impl SubstateAccess<LedgerWriteState> for State
Source§fn substate(&self) -> SubstateResult<&LedgerWriteState>
fn substate(&self) -> SubstateResult<&LedgerWriteState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut LedgerWriteState>
fn substate_mut(&mut self) -> SubstateResult<&mut LedgerWriteState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pConfig> for State
impl SubstateAccess<P2pConfig> for State
Source§fn substate(&self) -> SubstateResult<&P2pConfig>
fn substate(&self) -> SubstateResult<&P2pConfig>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut P2pConfig>
fn substate_mut(&mut self) -> SubstateResult<&mut P2pConfig>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pLimits> for State
impl SubstateAccess<P2pLimits> for State
Source§fn substate(&self) -> SubstateResult<&P2pLimits>
fn substate(&self) -> SubstateResult<&P2pLimits>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut P2pLimits>
fn substate_mut(&mut self) -> SubstateResult<&mut P2pLimits>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkIdentifyState> for State
impl SubstateAccess<P2pNetworkIdentifyState> for State
Source§fn substate(&self) -> SubstateResult<&P2pNetworkIdentifyState>
fn substate(&self) -> SubstateResult<&P2pNetworkIdentifyState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkIdentifyState>
fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkIdentifyState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkKadBootstrapState> for State
impl SubstateAccess<P2pNetworkKadBootstrapState> for State
Source§fn substate(&self) -> SubstateResult<&P2pNetworkKadBootstrapState>
fn substate(&self) -> SubstateResult<&P2pNetworkKadBootstrapState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkKadBootstrapState>
fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkKadBootstrapState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkKadState> for State
impl SubstateAccess<P2pNetworkKadState> for State
Source§fn substate(&self) -> SubstateResult<&P2pNetworkKadState>
fn substate(&self) -> SubstateResult<&P2pNetworkKadState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkKadState>
fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkKadState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkPubsubState> for State
impl SubstateAccess<P2pNetworkPubsubState> for State
Source§fn substate(&self) -> SubstateResult<&P2pNetworkPubsubState>
fn substate(&self) -> SubstateResult<&P2pNetworkPubsubState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkPubsubState>
fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkPubsubState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkSchedulerState> for State
impl SubstateAccess<P2pNetworkSchedulerState> for State
Source§fn substate(&self) -> SubstateResult<&P2pNetworkSchedulerState>
fn substate(&self) -> SubstateResult<&P2pNetworkSchedulerState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkSchedulerState>
fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkSchedulerState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkState> for State
impl SubstateAccess<P2pNetworkState> for State
Source§fn substate(&self) -> SubstateResult<&P2pNetworkState>
fn substate(&self) -> SubstateResult<&P2pNetworkState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkState>
fn substate_mut(&mut self) -> SubstateResult<&mut P2pNetworkState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pState> for State
impl SubstateAccess<P2pState> for State
Source§fn substate(&self) -> SubstateResult<&P2pState>
fn substate(&self) -> SubstateResult<&P2pState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut P2pState>
fn substate_mut(&mut self) -> SubstateResult<&mut P2pState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<RpcState> for State
impl SubstateAccess<RpcState> for State
Source§fn substate(&self) -> SubstateResult<&RpcState>
fn substate(&self) -> SubstateResult<&RpcState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut RpcState>
fn substate_mut(&mut self) -> SubstateResult<&mut RpcState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<SnarkBlockVerifyState> for State
impl SubstateAccess<SnarkBlockVerifyState> for State
Source§fn substate(&self) -> SubstateResult<&SnarkBlockVerifyState>
fn substate(&self) -> SubstateResult<&SnarkBlockVerifyState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut SnarkBlockVerifyState>
fn substate_mut(&mut self) -> SubstateResult<&mut SnarkBlockVerifyState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<SnarkPoolCandidatesState> for State
impl SubstateAccess<SnarkPoolCandidatesState> for State
Source§fn substate(&self) -> SubstateResult<&SnarkPoolCandidatesState>
fn substate(&self) -> SubstateResult<&SnarkPoolCandidatesState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut SnarkPoolCandidatesState>
fn substate_mut(&mut self) -> SubstateResult<&mut SnarkPoolCandidatesState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<SnarkPoolState> for State
impl SubstateAccess<SnarkPoolState> for State
Source§fn substate(&self) -> SubstateResult<&SnarkPoolState>
fn substate(&self) -> SubstateResult<&SnarkPoolState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut SnarkPoolState>
fn substate_mut(&mut self) -> SubstateResult<&mut SnarkPoolState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<SnarkState> for State
impl SubstateAccess<SnarkState> for State
Source§fn substate(&self) -> SubstateResult<&SnarkState>
fn substate(&self) -> SubstateResult<&SnarkState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut SnarkState>
fn substate_mut(&mut self) -> SubstateResult<&mut SnarkState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<SnarkUserCommandVerifyState> for State
impl SubstateAccess<SnarkUserCommandVerifyState> for State
Source§fn substate(&self) -> SubstateResult<&SnarkUserCommandVerifyState>
fn substate(&self) -> SubstateResult<&SnarkUserCommandVerifyState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut SnarkUserCommandVerifyState>
fn substate_mut(&mut self) -> SubstateResult<&mut SnarkUserCommandVerifyState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<SnarkWorkVerifyState> for State
impl SubstateAccess<SnarkWorkVerifyState> for State
Source§fn substate(&self) -> SubstateResult<&SnarkWorkVerifyState>
fn substate(&self) -> SubstateResult<&SnarkWorkVerifyState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut SnarkWorkVerifyState>
fn substate_mut(&mut self) -> SubstateResult<&mut SnarkWorkVerifyState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<State> for State
impl SubstateAccess<State> for State
Source§fn substate(&self) -> SubstateResult<&State>
fn substate(&self) -> SubstateResult<&State>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut State>
fn substate_mut(&mut self) -> SubstateResult<&mut State>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<TransactionPoolCandidatesState> for State
impl SubstateAccess<TransactionPoolCandidatesState> for State
Source§fn substate(&self) -> SubstateResult<&TransactionPoolCandidatesState>
fn substate(&self) -> SubstateResult<&TransactionPoolCandidatesState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(
&mut self,
) -> SubstateResult<&mut TransactionPoolCandidatesState>
fn substate_mut( &mut self, ) -> SubstateResult<&mut TransactionPoolCandidatesState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<TransactionPoolState> for State
impl SubstateAccess<TransactionPoolState> for State
Source§fn substate(&self) -> SubstateResult<&TransactionPoolState>
fn substate(&self) -> SubstateResult<&TransactionPoolState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut TransactionPoolState>
fn substate_mut(&mut self) -> SubstateResult<&mut TransactionPoolState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<TransitionFrontierCandidatesState> for State
impl SubstateAccess<TransitionFrontierCandidatesState> for State
Source§fn substate(&self) -> SubstateResult<&TransitionFrontierCandidatesState>
fn substate(&self) -> SubstateResult<&TransitionFrontierCandidatesState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(
&mut self,
) -> SubstateResult<&mut TransitionFrontierCandidatesState>
fn substate_mut( &mut self, ) -> SubstateResult<&mut TransitionFrontierCandidatesState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<TransitionFrontierGenesisState> for State
impl SubstateAccess<TransitionFrontierGenesisState> for State
Source§fn substate(&self) -> SubstateResult<&TransitionFrontierGenesisState>
fn substate(&self) -> SubstateResult<&TransitionFrontierGenesisState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(
&mut self,
) -> SubstateResult<&mut TransitionFrontierGenesisState>
fn substate_mut( &mut self, ) -> SubstateResult<&mut TransitionFrontierGenesisState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<TransitionFrontierState> for State
impl SubstateAccess<TransitionFrontierState> for State
Source§fn substate(&self) -> SubstateResult<&TransitionFrontierState>
fn substate(&self) -> SubstateResult<&TransitionFrontierState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut TransitionFrontierState>
fn substate_mut(&mut self) -> SubstateResult<&mut TransitionFrontierState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<TransitionFrontierSyncLedgerSnarkedState> for State
impl SubstateAccess<TransitionFrontierSyncLedgerSnarkedState> for State
Source§fn substate(&self) -> SubstateResult<&TransitionFrontierSyncLedgerSnarkedState>
fn substate(&self) -> SubstateResult<&TransitionFrontierSyncLedgerSnarkedState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(
&mut self,
) -> SubstateResult<&mut TransitionFrontierSyncLedgerSnarkedState>
fn substate_mut( &mut self, ) -> SubstateResult<&mut TransitionFrontierSyncLedgerSnarkedState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<TransitionFrontierSyncLedgerStagedState> for State
impl SubstateAccess<TransitionFrontierSyncLedgerStagedState> for State
Source§fn substate(&self) -> SubstateResult<&TransitionFrontierSyncLedgerStagedState>
fn substate(&self) -> SubstateResult<&TransitionFrontierSyncLedgerStagedState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(
&mut self,
) -> SubstateResult<&mut TransitionFrontierSyncLedgerStagedState>
fn substate_mut( &mut self, ) -> SubstateResult<&mut TransitionFrontierSyncLedgerStagedState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<TransitionFrontierSyncLedgerState> for State
impl SubstateAccess<TransitionFrontierSyncLedgerState> for State
Source§fn substate(&self) -> SubstateResult<&TransitionFrontierSyncLedgerState>
fn substate(&self) -> SubstateResult<&TransitionFrontierSyncLedgerState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(
&mut self,
) -> SubstateResult<&mut TransitionFrontierSyncLedgerState>
fn substate_mut( &mut self, ) -> SubstateResult<&mut TransitionFrontierSyncLedgerState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<TransitionFrontierSyncState> for State
impl SubstateAccess<TransitionFrontierSyncState> for State
Source§fn substate(&self) -> SubstateResult<&TransitionFrontierSyncState>
fn substate(&self) -> SubstateResult<&TransitionFrontierSyncState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut TransitionFrontierSyncState>
fn substate_mut(&mut self) -> SubstateResult<&mut TransitionFrontierSyncState>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<WatchedAccountsState> for State
impl SubstateAccess<WatchedAccountsState> for State
Source§fn substate(&self) -> SubstateResult<&WatchedAccountsState>
fn substate(&self) -> SubstateResult<&WatchedAccountsState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut WatchedAccountsState>
fn substate_mut(&mut self) -> SubstateResult<&mut WatchedAccountsState>
Attempts to obtain a mutable reference to the substate. Read more
impl P2pActionTrait<State> for Action
impl P2pStateTrait for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
§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>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.