Struct limiting_factor::kernel::DefaultApplication[][src]

pub struct DefaultApplication {}
Expand description

The default application implements CLI program behavior to prepare a configuration from the DefaultConfig implementation, test if it’s possible to connect to the database, and if so, launch a Rocket server.

Examples

To run an application with some routes in a requests module:

use limiting_factor::kernel::DefaultApplication;
use requests::*;

pub fn main () {
    let routes = routes![
        status,
        favicon,
        users::register,
        users::get_player,
    ];

    DefaultApplication::start_application(routes);
}

The default configuration will be used and the server started.

Implementations

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

Performs the conversion.

Performs the conversion.

Converts self into a collection.

Convert self to an expression for Diesel’s query builder. Read more

Convert &self to an expression for Diesel’s query builder. Read more

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.