[][src]Struct repl_rs::Command

pub struct Command<Context> { /* fields omitted */ }

Struct to define a command in the REPL

Implementations

impl<Context> Command<Context>[src]

pub fn new(name: &str, callback: Callback<Context>) -> Self[src]

Create a new command with the given name and callback function

pub fn with_parameter(self, parameter: Parameter) -> Result<Command<Context>>[src]

Add a parameter to the command. The order of the parameters is the same as the order in which this is called for each parameter.

pub fn with_help(self, help: &str) -> Command<Context>[src]

Add a help summary for the command

Trait Implementations

impl<Context> Debug for Command<Context>[src]

impl<Context> PartialEq<Command<Context>> for Command<Context>[src]

Auto Trait Implementations

impl<Context> RefUnwindSafe for Command<Context>

impl<Context> Send for Command<Context>

impl<Context> Sync for Command<Context>

impl<Context> Unpin for Command<Context>

impl<Context> UnwindSafe for Command<Context>

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.