Struct puff_rs::program::commands::BasicCommand
source · pub struct BasicCommand<Fc: FnOnce(&ArgMatches) -> F + 'static, F: Future<Output = PuffResult<ExitCode>> + 'static> { /* private fields */ }Expand description
Expose a future to the command line.
Implementations
sourceimpl<Fc: FnOnce(&ArgMatches) -> Fut + 'static, Fut: Future<Output = PuffResult<ExitCode>> + 'static> BasicCommand<Fc, Fut>
impl<Fc: FnOnce(&ArgMatches) -> Fut + 'static, Fut: Future<Output = PuffResult<ExitCode>> + 'static> BasicCommand<Fc, Fut>
Trait Implementations
sourceimpl<Fc: FnOnce(&ArgMatches) -> F + 'static, F: Future<Output = PuffResult<ExitCode>> + 'static> RunnableCommand for BasicCommand<Fc, F>
impl<Fc: FnOnce(&ArgMatches) -> F + 'static, F: Future<Output = PuffResult<ExitCode>> + 'static> RunnableCommand for BasicCommand<Fc, F>
sourcefn cli_parser(&self) -> Command
fn cli_parser(&self) -> Command
The clap::Command that specifies the arguments and meta information.
sourcefn make_runnable(
&mut self,
args: &ArgMatches,
_context: PuffContext
) -> Result<Runnable>
fn make_runnable(
&mut self,
args: &ArgMatches,
_context: PuffContext
) -> Result<Runnable>
Converts parsed matches from the command line into a Runnable future.
Auto Trait Implementations
impl<Fc, F> !RefUnwindSafe for BasicCommand<Fc, F>
impl<Fc, F> Send for BasicCommand<Fc, F>where
Fc: Send,
impl<Fc, F> Sync for BasicCommand<Fc, F>where
Fc: Send,
impl<Fc, F> Unpin for BasicCommand<Fc, F>where
Fc: Unpin,
impl<Fc, F> !UnwindSafe for BasicCommand<Fc, F>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more