[−][src]Struct overlord::overlord::Overlord
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]
T: Codec + Send + Sync + 'static,
S: Codec + Send + Sync + 'static,
F: Consensus<T, S> + 'static,
C: Crypto + Send + Sync + 'static,
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]
&'_ self,
interval: u64,
timer_config: Option<DurationConfig>
) -> ConsensusResult<()>
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,
C: Sync,
S: Sync,
impl<T, S, F, C> Unpin for Overlord<T, S, F, C> where
C: Unpin,
S: Unpin,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,