Struct shellfish::handler::async_app::DefaultAsyncCLIHandler
source · pub struct DefaultAsyncCLIHandler {
pub proj_name: Option<String>,
}
Available on crate features
async
and app
only.Expand description
Shellfish’s CLI handler. This is helpful for when you want to parse input from the command line, rather than in an interactive case.
The main differences are:
- It expects the binary name to be first
- Aswell as
help
one can use--help
Fields§
§proj_name: Option<String>
Trait Implementations§
source§impl<T: Send> AsyncHandler<T> for DefaultAsyncCLIHandler
impl<T: Send> AsyncHandler<T> for DefaultAsyncCLIHandler
fn handle_async<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
line: Vec<String>,
commands: &'life1 HashMap<&'life2 str, Command<T>>,
state: &'life3 mut T,
description: &'life4 str
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
source§impl Clone for DefaultAsyncCLIHandler
impl Clone for DefaultAsyncCLIHandler
source§fn clone(&self) -> DefaultAsyncCLIHandler
fn clone(&self) -> DefaultAsyncCLIHandler
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for DefaultAsyncCLIHandler
impl Default for DefaultAsyncCLIHandler
source§fn default() -> DefaultAsyncCLIHandler
fn default() -> DefaultAsyncCLIHandler
Returns the “default value” for a type. Read more
source§impl PartialEq for DefaultAsyncCLIHandler
impl PartialEq for DefaultAsyncCLIHandler
source§fn eq(&self, other: &DefaultAsyncCLIHandler) -> bool
fn eq(&self, other: &DefaultAsyncCLIHandler) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for DefaultAsyncCLIHandler
impl StructuralEq for DefaultAsyncCLIHandler
impl StructuralPartialEq for DefaultAsyncCLIHandler
Auto Trait Implementations§
impl RefUnwindSafe for DefaultAsyncCLIHandler
impl Send for DefaultAsyncCLIHandler
impl Sync for DefaultAsyncCLIHandler
impl Unpin for DefaultAsyncCLIHandler
impl UnwindSafe for DefaultAsyncCLIHandler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more