pub struct SharedState<I: SyncIOListener, D: DeterministicState> { /* private fields */ }Expand description
A running shared-state node. Dropping it stops the background tasks.
Implementations§
pub fn start(config: SharedStateConfig<I, D>) -> Result<Self, SettingsError>
pub fn my_address(&self) -> I::Address
pub fn leader_address(&self) -> I::Address
pub fn set_leader_address(&self, leader_address: I::Address)
pub fn set_available_peers(&self, available_peers: Vec<I::Address>)
pub fn leader_address_sender(&self) -> Sender<I::Address>
pub fn available_peers_sender(&self) -> Sender<Vec<I::Address>>
pub fn is_leader(&self) -> bool
pub fn is_connected_to_leader(&self) -> bool
pub fn debug_info(&self) -> DebugInfo<I::Address>
pub fn node(&self) -> &Arc<NodeState<I::Address, D>>
pub fn metrics(&self) -> &Arc<SharedStateMetrics>
pub fn state_handle(&self) -> StateHandle<D>
pub async fn submit_action( &self, action: D::Action, ) -> Result<(), SendError<D::Action>>
pub fn actions_sender(&self) -> Sender<D::Action>
Trait Implementations§
Auto Trait Implementations§
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