pub struct Program { /* private fields */ }Expand description
A Puff Program that is responsible for parsing CLI arguments and starting the Runtime.
Implementations
sourceimpl Program
impl Program
sourcepub fn runtime_config(self, runtime_config: RuntimeConfig) -> Self
pub fn runtime_config(self, runtime_config: RuntimeConfig) -> Self
Override the current RuntimeConfig for this program.
Specify the author.
sourcepub fn after_help<T: Into<Text>>(self, after_help: T) -> Self
pub fn after_help<T: Into<Text>>(self, after_help: T) -> Self
Specify text after the help text of the CLI prompt.
sourcepub fn command<C: RunnableCommand>(self, command: C) -> Self
pub fn command<C: RunnableCommand>(self, command: C) -> Self
Adds a new command to be available to the Program.
sourcepub fn run(self) -> ExitCode
pub fn run(self) -> ExitCode
Run the program, handle and log the error if it fails.
See Self::try_run for more information.
Auto Trait Implementations
impl !RefUnwindSafe for Program
impl !Send for Program
impl !Sync for Program
impl Unpin for Program
impl !UnwindSafe for Program
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