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
impl RefUnwindSafe for DefaultApplication
impl Send for DefaultApplication
impl Sync for DefaultApplication
impl Unpin for DefaultApplication
impl UnwindSafe for DefaultApplication
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert self
to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more