[−][src]Struct casper_node::reactor::Runner
A runner for a reactor.
The runner manages a reactors event queue and reactor itself and can run it either continuously or in a step-by-step manner.
Implementations
impl<R> Runner<R> where
R: Reactor,
R::Error: From<Error>,
[src]
R: Reactor,
R::Error: From<Error>,
pub async fn new<'_>(
cfg: R::Config,
rng: &'_ mut dyn CryptoRngCore
) -> Result<Self, R::Error>
[src]
cfg: R::Config,
rng: &'_ mut dyn CryptoRngCore
) -> Result<Self, R::Error>
Creates a new runner from a given configuration.
Creates a metrics registry that is only going to be used in this runner.
pub async fn with_metrics<'_, '_>(
cfg: R::Config,
rng: &'_ mut dyn CryptoRngCore,
registry: &'_ Registry
) -> Result<Self, R::Error>
[src]
cfg: R::Config,
rng: &'_ mut dyn CryptoRngCore,
registry: &'_ Registry
) -> Result<Self, R::Error>
Creates a new runner from a given configuration, using existing metrics.
pub async fn crank<'_, '_>(&'_ mut self, rng: &'_ mut dyn CryptoRngCore)
[src]
Processes a single event on the event queue.
pub async fn try_crank<'_, '_>(
&'_ mut self,
rng: &'_ mut dyn CryptoRngCore
) -> Option<()>
[src]
&'_ mut self,
rng: &'_ mut dyn CryptoRngCore
) -> Option<()>
Processes a single event if there is one, returns None
otherwise.
pub async fn run<'_, '_>(&'_ mut self, rng: &'_ mut dyn CryptoRngCore)
[src]
Runs the reactor until is_stopped()
returns true.
pub fn reactor(&self) -> &R
[src]
Returns a reference to the reactor.
pub fn reactor_mut(&mut self) -> &mut R
[src]
Returns a mutable reference to the reactor.
pub fn into_inner(self) -> R
[src]
Deconstructs the runner to return the reactor.
Trait Implementations
Auto Trait Implementations
impl<R> !RefUnwindSafe for Runner<R>
impl<R> Send for Runner<R> where
R: Send,
<R as Reactor>::Event: Send,
R: Send,
<R as Reactor>::Event: Send,
impl<R> Sync for Runner<R> where
R: Sync,
<R as Reactor>::Event: Send,
R: Sync,
<R as Reactor>::Event: Send,
impl<R> Unpin for Runner<R> where
R: Unpin,
R: Unpin,
impl<R> !UnwindSafe for Runner<R>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> FromBits<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,