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

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

An overlord consensus instance.

Methods

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

pub fn new(
    address: Address,
    consensus: Arc<F>,
    crypto: Arc<C>,
    wal: Arc<W>
) -> 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,
    authority_list: Vec<Node>,
    timer_config: Option<DurationConfig>
) -> ConsensusResult<()>
[src]

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

Auto Trait Implementations

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

impl<T, F, C, W> Send for Overlord<T, F, C, W> where
    C: Sync,
    W: Send + Sync

impl<T, F, C, W> Sync for Overlord<T, F, C, W> where
    C: Sync,
    W: Send + Sync

impl<T, F, C, W> Unpin for Overlord<T, F, C, W>

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

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.