[][src]Struct bravery::App

pub struct App<T> { /* fields omitted */ }

Methods

impl<T: 'static + Clone + Send + Sync> App<T>[src]

pub fn new_with_state(context: T) -> App<T>[src]

pub fn get(
    self: &mut App<T>,
    path: &str,
    handler: Box<dyn Handler<T> + Send + Sync>
)
[src]

pub fn post(
    self: &mut App<T>,
    path: &str,
    handler: Box<dyn Handler<T> + Send + Sync>
)
[src]

pub fn inject(self: &App<T>, request: Request<T>) -> Response[src]

pub fn create_request(
    self: &App<T>,
    method: &str,
    path: &str,
    params: &str,
    body: Vec<u8>
) -> Request<T>
[src]

pub fn run(self: App<T>, addr: SocketAddr) -> Result<(), Box<dyn Error>>[src]

Trait Implementations

impl Default for App<EmptyState>[src]

Auto Trait Implementations

impl<T> Send for App<T> where
    T: Send

impl<T> Sync for App<T> where
    T: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T