Struct puff_rs::program::Program

source ·
pub struct Program { /* private fields */ }
Expand description

A Puff Program that is responsible for parsing CLI arguments and starting the Runtime.

Implementations

Creates a Program with the specified name.

Override the current RuntimeConfig for this program.

Specify the author.

Specify the version.

Specify what your program does.

Specify text after the help text of the CLI prompt.

Adds a new command to be available to the Program.

Run the program, handle and log the error if it fails.

See Self::try_run for more information.

Tries to run the program and returns an Error if it fails.

This will parse the command line arguments, start a new runtime and blocks until the command finishes.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more