pub struct DefaultConsensusPlugin;Expand description
In-memory consensus plug-in suitable for tests and simple deployments.
The ConsensusPlugin trait itself is defined in crate::core.
Trait Implementations§
Source§impl ConsensusPlugin for DefaultConsensusPlugin
impl ConsensusPlugin for DefaultConsensusPlugin
Source§type ConsensusStorage = InMemoryConsensusStorage<String>
type ConsensusStorage = InMemoryConsensusStorage<String>
Proposal/vote persistence (default:
InMemoryConsensusStorage<String>).Source§type EventBus = BroadcastEventBus<String>
type EventBus = BroadcastEventBus<String>
Consensus-outcome delivery (default:
BroadcastEventBus<String>).Source§type Signer = EthereumConsensusSigner
type Signer = EthereumConsensusSigner
Signature scheme for authenticating votes (default:
hashgraph_like_consensus::signing::EthereumConsensusSigner).
All peers on a network must agree.Source§fn new_storage() -> Self::ConsensusStorage
fn new_storage() -> Self::ConsensusStorage
Build a fresh storage handle. Called once at
User init; the handle
is cloned per conversation so all per-conv ConsensusService instances
share one underlying persistence (see upstream “per-scope service
composition” pattern).Source§fn new_event_bus() -> Self::EventBus
fn new_event_bus() -> Self::EventBus
Build a fresh event bus for one conversation. Each per-conv
ConsensusService owns its own bus; subscribers automatically see
only that conversation’s events.Auto Trait Implementations§
impl Freeze for DefaultConsensusPlugin
impl RefUnwindSafe for DefaultConsensusPlugin
impl Send for DefaultConsensusPlugin
impl Sync for DefaultConsensusPlugin
impl Unpin for DefaultConsensusPlugin
impl UnsafeUnpin for DefaultConsensusPlugin
impl UnwindSafe for DefaultConsensusPlugin
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> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more