pub struct Console { /* private fields */ }Expand description
Application CLI console built around a binary name and named commands.
Implementations§
Source§impl Console
impl Console
Sourcepub fn new(binary_name: impl Into<String>) -> Console
pub fn new(binary_name: impl Into<String>) -> Console
Create a console whose help text uses binary_name.
Sourcepub fn about(self, about: impl Into<String>) -> Console
pub fn about(self, about: impl Into<String>) -> Console
Short description printed above the usage block.
Sourcepub fn serve<F, Fut>(self, handler: F) -> Console
pub fn serve<F, Fut>(self, handler: F) -> Console
Register the built-in serve command that starts the HTTP application.
Sourcepub fn commands(
self,
commands: impl IntoIterator<Item = CommandEntry>,
) -> Console
pub fn commands( self, commands: impl IntoIterator<Item = CommandEntry>, ) -> Console
Append user-registered commands from commands! or a manual list.
Auto Trait Implementations§
impl !RefUnwindSafe for Console
impl !UnwindSafe for Console
impl Freeze for Console
impl Send for Console
impl Sync for Console
impl Unpin for Console
impl UnsafeUnpin for Console
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