Struct actix_web::test::TestApp [−][src]
pub struct TestApp<S = ()> { /* fields omitted */ }
Test application helper for testing request handlers.
Methods
impl<S: 'static> TestApp<S>
[src]
impl<S: 'static> TestApp<S>
pub fn handler<F, R>(&mut self, handler: F) where
F: Fn(&HttpRequest<S>) -> R + 'static,
R: Responder + 'static,
[src]
pub fn handler<F, R>(&mut self, handler: F) where
F: Fn(&HttpRequest<S>) -> R + 'static,
R: Responder + 'static,
Register handler for "/"
pub fn middleware<T>(&mut self, mw: T) -> &mut TestApp<S> where
T: Middleware<S> + 'static,
[src]
pub fn middleware<T>(&mut self, mw: T) -> &mut TestApp<S> where
T: Middleware<S> + 'static,
Register middleware
pub fn resource<F, R>(&mut self, path: &str, f: F) -> &mut TestApp<S> where
F: FnOnce(&mut Resource<S>) -> R + 'static,
[src]
pub fn resource<F, R>(&mut self, path: &str, f: F) -> &mut TestApp<S> where
F: FnOnce(&mut Resource<S>) -> R + 'static,
Register resource. This method is similar
to App::resource()
method.
Trait Implementations
impl<S: 'static> IntoHttpHandler for TestApp<S>
[src]
impl<S: 'static> IntoHttpHandler for TestApp<S>
type Handler = HttpApplication<S>
The associated type which is result of conversion.
fn into_handler(self) -> HttpApplication<S>
[src]
fn into_handler(self) -> HttpApplication<S>
Convert into HttpHandler
object.