[][src]Struct overlord::overlord::Overlord

pub struct Overlord<T: Codec, S: Codec, F: Consensus<T, S>, C: Crypto> { /* fields omitted */ }

An overlord consensus instance.

Methods

impl<T, S, F, C> Overlord<T, S, F, C> where
    T: Codec + Send + Sync + 'static,
    S: Codec + Send + Sync + 'static,
    F: Consensus<T, S> + 'static,
    C: Crypto + Send + Sync + 'static, 
[src]

pub fn new(address: Address, consensus: Arc<F>, crypto: C) -> Self[src]

Create a new overlord and return an overlord instance with an unbounded receiver.

pub fn get_handler(&self) -> OverlordHandler<T>[src]

Get the overlord handler from the overlord instance.

pub async fn run<'_>(
    &'_ self,
    interval: u64,
    timer_config: Option<DurationConfig>
) -> ConsensusResult<()>
[src]

Run overlord consensus process. The interval is the epoch interval as millisecond.

Auto Trait Implementations

impl<T, S, F, C> Send for Overlord<T, S, F, C>

impl<T, S, F, C> Sync for Overlord<T, S, F, C> where
    C: Sync,
    S: Sync

impl<T, S, F, C> Unpin for Overlord<T, S, F, C> where
    C: Unpin,
    S: Unpin

impl<T, S, F, C> !UnwindSafe for Overlord<T, S, F, C>

impl<T, S, F, C> !RefUnwindSafe for Overlord<T, S, F, C>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]