pub struct Application<U>where
    U: Config,
{ /* private fields */ }
Expand description

The application structure allows to encapsulate the service into a CLI application.

The application takes care to run the service and quits with a correct exit code.

It also takes care of initialisation logic like parse the environment to extract the configuration.

Implementations

Starts the application

Exit codes

The software will exit with the following error codes:

  • 0: Graceful exit (currently not in use, as the application never stops)
  • 1: Error during the application run (e.g. routes conflict or Rocket fairings issues)
  • 2: Error parsing the configuration (e.g. no database URL has been defined)

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.

Calls U::from(self).

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

Converts self into a collection.
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.
Get the TypeId of this object.