Trait embedded_cli::service::Help
source · pub trait Help {
// Required methods
fn command_count() -> usize;
fn list_commands<W: Write<Error = E>, E: Error>(
writer: &mut Writer<'_, W, E>
) -> Result<(), E>;
fn command_help<W: Write<Error = E>, E: Error, F: FnMut(&mut Writer<'_, W, E>) -> Result<(), E>>(
parent: &mut F,
command: RawCommand<'_>,
writer: &mut Writer<'_, W, E>
) -> Result<(), HelpError<E>>;
}Required Methods§
sourcefn command_count() -> usize
fn command_count() -> usize
How many commands are known
sourcefn list_commands<W: Write<Error = E>, E: Error>(
writer: &mut Writer<'_, W, E>
) -> Result<(), E>
fn list_commands<W: Write<Error = E>, E: Error>( writer: &mut Writer<'_, W, E> ) -> Result<(), E>
Print all commands and short description of each
sourcefn command_help<W: Write<Error = E>, E: Error, F: FnMut(&mut Writer<'_, W, E>) -> Result<(), E>>(
parent: &mut F,
command: RawCommand<'_>,
writer: &mut Writer<'_, W, E>
) -> Result<(), HelpError<E>>
fn command_help<W: Write<Error = E>, E: Error, F: FnMut(&mut Writer<'_, W, E>) -> Result<(), E>>( parent: &mut F, command: RawCommand<'_>, writer: &mut Writer<'_, W, E> ) -> Result<(), HelpError<E>>
Print help for given command. Command might contain -h or –help options Use given writer to print help text If help request cannot be processed by this object, Err(HelpError::UnknownCommand) must be returned
Object Safety§
This trait is not object safe.