[][src]Struct clishe::Shell

pub struct Shell<C, R, A: Clap + Command<C, R>> { /* fields omitted */ }

A command that spawns a shell of the provided dispatcher type.

The shell command spawns a shell using rustyline and shellwords libraries. The type arguments it takes are straightforward:

  • Context type (state)
  • Return type (same as command hierarchy)
  • Dispatcher to create a shell for (can be self-referential)

Example

This example is not tested
dispatchers! {
    Food(self, _: &mut u64) -> Result<()> [
        Shell: clishe::Shell<u64, (), Food>,
    ],
}

Trait Implementations

impl<C, R, A> Clap for Shell<C, R, A> where
    A: Clap + Command<C, R>, 
[src]

impl<C, R, A> Command<C, R> for Shell<C, R, A> where
    A: Clap + Command<C, R>, 
[src]

impl<C, R, A> FromArgMatches for Shell<C, R, A> where
    A: Clap + Command<C, R>, 
[src]

impl<C, R, A> IntoApp for Shell<C, R, A> where
    A: Clap + Command<C, R>, 
[src]

Auto Trait Implementations

impl<C, R, A> RefUnwindSafe for Shell<C, R, A> where
    A: RefUnwindSafe,
    C: RefUnwindSafe,
    R: RefUnwindSafe

impl<C, R, A> Send for Shell<C, R, A> where
    A: Send,
    C: Send,
    R: Send

impl<C, R, A> Sync for Shell<C, R, A> where
    A: Sync,
    C: Sync,
    R: Sync

impl<C, R, A> Unpin for Shell<C, R, A> where
    A: Unpin,
    C: Unpin,
    R: Unpin

impl<C, R, A> UnwindSafe for Shell<C, R, A> where
    A: UnwindSafe,
    C: UnwindSafe,
    R: UnwindSafe

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, 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.