[][src]Struct spirit::Builder

#[must_use = "The builder is inactive without calling `run` or `build`"]pub struct Builder<O = Empty, C = Empty> { /* fields omitted */ }

The builder of Spirit.

This is returned by the Spirit::new.

Interface

Most of the methods are available through the following traits. You want to bring them into scope (possibly by use spirit::prelude::*) and look at their methods.

Implementations

impl<O, C> Builder<O, C> where
    C: DeserializeOwned + Send + Sync + 'static,
    O: StructOpt + Sync + Send + 'static, 
[src]

pub fn config_loader(self, loader: CfgBuilder) -> Self[src]

Sets the inner config loader.

Instead of configuring the configuration loading on the spirit Builder, the inner config loader Builder can be set directly.

Trait Implementations

impl<O, C> ConfigBuilder for Builder<O, C>[src]

impl<O, C> Extensible for Builder<O, C>[src]

type Opts = O

The command line options structure tied to this instance. Read more

type Config = C

The configuration structure. Read more

type Ok = Self

The Ok variant used when returning a result. Read more

impl<O, C> SpiritBuilder for Builder<O, C> where
    Self::Config: DeserializeOwned + Send + Sync + 'static,
    Self::Opts: StructOpt + Sync + Send + 'static, 
[src]

Auto Trait Implementations

impl<O = Empty, C = Empty> !RefUnwindSafe for Builder<O, C>

impl<O, C> Send for Builder<O, C> where
    C: Send,
    O: Send

impl<O = Empty, C = Empty> !Sync for Builder<O, C>

impl<O, C> Unpin for Builder<O, C> where
    C: Unpin,
    O: Unpin

impl<O = Empty, C = Empty> !UnwindSafe for Builder<O, 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> From<T> for T[src]

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

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

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.