Struct sc_cli::Runner [−][src]
pub struct Runner<C: SubstrateCli> { /* fields omitted */ }
A Substrate CLI runtime that can be used to run a node or a command
Implementations
impl<C: SubstrateCli> Runner<C>[src]
impl<C: SubstrateCli> Runner<C>[src]pub fn new<T: CliConfiguration>(
    cli: &C, 
    command: &T, 
    telemetry_worker: TelemetryWorker
) -> Result<Runner<C>>[src]
cli: &C,
command: &T,
telemetry_worker: TelemetryWorker
) -> Result<Runner<C>>
Create a new runtime with the command provided in argument
pub fn run_node_until_exit<F, E>(
    self, 
    initialize: impl FnOnce(Configuration) -> F
) -> Result<(), E> where
    F: Future<Output = Result<TaskManager, E>>,
    E: Error + Send + Sync + 'static + From<ServiceError>, [src]
self,
initialize: impl FnOnce(Configuration) -> F
) -> Result<(), E> where
F: Future<Output = Result<TaskManager, E>>,
E: Error + Send + Sync + 'static + From<ServiceError>,
A helper function that runs a node with tokio and stops if the process receives the signal
SIGTERM or SIGINT.
pub fn sync_run<E>(
    self, 
    runner: impl FnOnce(Configuration) -> Result<(), E>
) -> Result<(), E> where
    E: Error + Send + Sync + 'static + From<ServiceError>, [src]
self,
runner: impl FnOnce(Configuration) -> Result<(), E>
) -> Result<(), E> where
E: Error + Send + Sync + 'static + From<ServiceError>,
A helper function that runs a command with the configuration of this node.
pub fn async_run<F, E>(
    self, 
    runner: impl FnOnce(Configuration) -> Result<(F, TaskManager), E>
) -> Result<(), E> where
    F: Future<Output = Result<(), E>>,
    E: Error + Send + Sync + 'static + From<ServiceError> + From<CliError>, [src]
self,
runner: impl FnOnce(Configuration) -> Result<(F, TaskManager), E>
) -> Result<(), E> where
F: Future<Output = Result<(), E>>,
E: Error + Send + Sync + 'static + From<ServiceError> + From<CliError>,
A helper function that runs a future with tokio and stops if the process receives
the signal SIGTERM or SIGINT.
pub fn config(&self) -> &Configuration[src]
Get an immutable reference to the node Configuration
pub fn config_mut(&mut self) -> &mut Configuration[src]
Get a mutable reference to the node Configuration
pub fn telemetry_handle(&self) -> TelemetryHandle[src]
Get a new TelemetryHandle.
This is used when you want to register with the TelemetryWorker.
Auto Trait Implementations
impl<C> !RefUnwindSafe for Runner<C>
impl<C> Send for Runner<C> where
    C: Send, 
C: Send,
impl<C> Sync for Runner<C> where
    C: Sync, 
C: Sync,
impl<C> Unpin for Runner<C> where
    C: Unpin, 
C: Unpin,
impl<C> !UnwindSafe for Runner<C>
Blanket Implementations
impl<T> CheckedConversion for T[src]
impl<T> CheckedConversion for T[src]pub fn checked_from<T>(t: T) -> Option<Self> where
    Self: TryFrom<T>, [src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
    Self: TryInto<T>, [src]
Self: TryInto<T>,
impl<T> Instrument 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]
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, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, [src]
impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, [src]impl<T> SaturatedConversion for T[src]
impl<T> SaturatedConversion for T[src]pub fn saturated_from<T>(t: T) -> Self where
    Self: UniqueSaturatedFrom<T>, [src]
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
    Self: UniqueSaturatedInto<T>, [src]
Self: UniqueSaturatedInto<T>,
impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, [src]
impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, [src]pub fn unchecked_into(self) -> T[src]
impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, [src]
impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, [src]pub fn unique_saturated_into(self) -> T[src]
impl<T> WithSubscriber for T[src]
impl<T> WithSubscriber for T[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, [src]
S: Into<Dispatch>,