[−][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::Event: Serialize,
R::Error: From<Error>, [src]
R: Reactor,
R::Event: Serialize,
R::Error: From<Error>,
pub async fn new(cfg: R::Config, rng: &mut NodeRng) -> Result<Self, R::Error>[src]
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 NodeRng,
registry: &Registry
) -> Result<Self, R::Error>[src]
cfg: R::Config,
rng: &mut NodeRng,
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 NodeRng)[src]
Processes a single event on the event queue.
pub async fn try_crank(&mut self, rng: &mut NodeRng) -> Option<()>[src]
Processes a single event if there is one, returns None otherwise.
pub async fn run(&mut self, rng: &mut NodeRng)[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>[src]
impl<R> Send for Runner<R> where
R: Send,
<R as Reactor>::Event: Send, [src]
R: Send,
<R as Reactor>::Event: Send,
impl<R> Sync for Runner<R> where
R: Sync,
<R as Reactor>::Event: Send, [src]
R: Sync,
<R as Reactor>::Event: Send,
impl<R> Unpin for Runner<R> where
R: Unpin, [src]
R: Unpin,
impl<R> !UnwindSafe for Runner<R>[src]
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> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub 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]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>, [src]
S: Into<Dispatch>,