[][src]Struct sc_cli::Runner

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]

pub fn new<T: CliConfiguration>(cli: &C, command: &T) -> Result<Runner<C>>[src]

Create a new runtime with the command provided in argument

pub fn run_node_until_exit(
    self,
    initialise: impl FnOnce(Configuration) -> Result<TaskManager>
) -> Result<()>
[src]

A helper function that runs a node with tokio and stops if the process receives the signal SIGTERM or SIGINT.

pub fn sync_run(
    self,
    runner: impl FnOnce(Configuration) -> Result<()>
) -> Result<()>
[src]

A helper function that runs a command with the configuration of this node

pub fn async_run<FUT>(
    self,
    runner: impl FnOnce(Configuration) -> Result<(FUT, TaskManager)>
) -> Result<()> where
    FUT: Future<Output = Result<()>>, 
[src]

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

Auto Trait Implementations

impl<C> !RefUnwindSafe for Runner<C>

impl<C> Send for Runner<C> where
    C: Send

impl<C> !Sync for Runner<C>

impl<C> Unpin for Runner<C> where
    C: Unpin

impl<C> !UnwindSafe for Runner<C>

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> CheckedConversion for T[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

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.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,