[−][src]Struct molt::types::Subcommand
Used for defining subcommands of ensemble commands.
The tuple fields are the subcommand's name and CommandFunc
.
TODO: This interface isn't yet stable; we probably want to support Command
instead of CommandFunc
.
Methods
impl Subcommand
[src]
pub fn find<'a>(
subs: &'a [Subcommand],
sub: &str
) -> Result<&'a Subcommand, ResultCode>
[src]
subs: &'a [Subcommand],
sub: &str
) -> Result<&'a Subcommand, ResultCode>
Looks up a subcommand of an ensemble command by name in a table,
returning the usual error if it can't be found. It is up to the
ensemble command to call the returned subcommand with the
appropriate arguments. See the implementation of the info
command for an example.
TCL Notes
- In standard TCL, subcommand lookups accept any unambiguous prefix of the subcommand name, as a convenience for interactive use. Molt does not.
Auto Trait Implementations
impl Sync for Subcommand
impl Send for Subcommand
impl Unpin for Subcommand
impl UnwindSafe for Subcommand
impl RefUnwindSafe for Subcommand
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,