[][src]Struct eve_rs::App

pub struct App<TContext, TMiddleware, TState> where
    TContext: Context + Debug + Send + Sync,
    TMiddleware: Middleware<TContext> + Clone + Send + Sync,
    TState: Send + Sync
{ /* fields omitted */ }

Implementations

impl<TContext, TMiddleware, TState> App<TContext, TMiddleware, TState> where
    TContext: 'static + Context + Debug + Send + Sync,
    TMiddleware: 'static + Middleware<TContext> + Clone + Send + Sync,
    TState: Send + Sync
[src]

pub fn create(
    context_generator: fn(_: Request, _: &TState) -> TContext,
    state: TState
) -> Self
[src]

pub fn get_state(&self) -> &TState[src]

pub fn set_error_handler(
    &mut self,
    error_handler: fn(_: Response, _: Box<dyn StdError>) -> Response
)
[src]

pub fn remove_error_handler(&mut self)[src]

pub fn get(&mut self, path: &str, middlewares: &[TMiddleware])[src]

pub fn post(&mut self, path: &str, middlewares: &[TMiddleware])[src]

pub fn put(&mut self, path: &str, middlewares: &[TMiddleware])[src]

pub fn delete(&mut self, path: &str, middlewares: &[TMiddleware])[src]

pub fn head(&mut self, path: &str, middlewares: &[TMiddleware])[src]

pub fn options(&mut self, path: &str, middlewares: &[TMiddleware])[src]

pub fn connect(&mut self, path: &str, middlewares: &[TMiddleware])[src]

pub fn patch(&mut self, path: &str, middlewares: &[TMiddleware])[src]

pub fn trace(&mut self, path: &str, middlewares: &[TMiddleware])[src]

pub fn use_middleware(&mut self, path: &str, middlewares: &[TMiddleware])[src]

pub fn use_sub_app<TSubAppState>(
    &mut self,
    base_path: &str,
    sub_app: App<TContext, TMiddleware, TSubAppState>
) where
    TSubAppState: Send + Sync
[src]

pub async fn resolve<'_>(
    &'_ self,
    context: TContext
) -> Result<TContext, Error<TContext>>
[src]

Trait Implementations

impl<TContext: Clone, TMiddleware: Clone, TState: Clone> Clone for App<TContext, TMiddleware, TState> where
    TContext: Context + Debug + Send + Sync,
    TMiddleware: Middleware<TContext> + Clone + Send + Sync,
    TState: Send + Sync
[src]

impl<TContext, TMiddleware, TState> Default for App<TContext, TMiddleware, TState> where
    TContext: 'static + Context + Default + Debug + Send + Sync,
    TMiddleware: 'static + Middleware<TContext> + Clone + Send + Sync,
    TState: Default + Send + Sync
[src]

Auto Trait Implementations

impl<TContext, TMiddleware, TState> !RefUnwindSafe for App<TContext, TMiddleware, TState>[src]

impl<TContext, TMiddleware, TState> Send for App<TContext, TMiddleware, TState>[src]

impl<TContext, TMiddleware, TState> Sync for App<TContext, TMiddleware, TState>[src]

impl<TContext, TMiddleware, TState> Unpin for App<TContext, TMiddleware, TState> where
    TContext: Unpin,
    TMiddleware: Unpin,
    TState: Unpin
[src]

impl<TContext, TMiddleware, TState> UnwindSafe for App<TContext, TMiddleware, TState> where
    TContext: UnwindSafe,
    TMiddleware: UnwindSafe,
    TState: UnwindSafe
[src]

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.