[−][src]Struct repl_rs::Command
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,