[−][src]Struct eve_rs::App
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]
TContext: 'static + Context + Debug + Send + Sync,
TMiddleware: 'static + Middleware<TContext> + Clone + Send + Sync,
TState: Send + Sync,
pub fn create(
context_generator: fn(_: Request, _: &TState) -> TContext,
state: TState
) -> Self
[src]
context_generator: fn(_: Request, _: &TState) -> TContext,
state: TState
) -> Self
pub fn get_state(&self) -> &TState
[src]
pub fn set_error_handler(
&mut self,
error_handler: fn(_: Response, _: Box<dyn StdError>) -> Response
)
[src]
&mut self,
error_handler: fn(_: Response, _: Box<dyn StdError>) -> Response
)
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]
&mut self,
base_path: &str,
sub_app: App<TContext, TMiddleware, TSubAppState>
) where
TSubAppState: Send + Sync,
pub async fn resolve<'_>(
&'_ self,
context: TContext
) -> Result<TContext, Error<TContext>>
[src]
&'_ self,
context: TContext
) -> Result<TContext, Error<TContext>>
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]
TContext: Context + Debug + Send + Sync,
TMiddleware: Middleware<TContext> + Clone + Send + Sync,
TState: Send + Sync,
pub fn clone(&self) -> App<TContext, TMiddleware, TState>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
TContext: 'static + Context + Default + Debug + Send + Sync,
TMiddleware: 'static + Middleware<TContext> + Clone + Send + Sync,
TState: Default + Send + Sync,
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]
TContext: Unpin,
TMiddleware: Unpin,
TState: Unpin,
impl<TContext, TMiddleware, TState> UnwindSafe for App<TContext, TMiddleware, TState> where
TContext: UnwindSafe,
TMiddleware: UnwindSafe,
TState: UnwindSafe,
[src]
TContext: UnwindSafe,
TMiddleware: UnwindSafe,
TState: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,