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]
pub fn handler<H: Handler<S>>(&mut self, handler: H)[src]
Register handler for "/"
pub fn middleware<T>(&mut self, mw: T) -> &mut TestApp<S> where
T: Middleware<S> + 'static, [src]
T: Middleware<S> + 'static,
Register middleware
pub fn resource<F, R>(&mut self, path: &str, f: F) -> &mut TestApp<S> where
F: FnOnce(&mut ResourceHandler<S>) -> R + 'static, [src]
F: FnOnce(&mut ResourceHandler<S>) -> R + 'static,
Register resource. This method is similar
to App::resource() method.
Trait Implementations
impl<S: 'static> IntoHttpHandler for TestApp<S>[src]
type Handler = HttpApplication<S>
The associated type which is result of conversion.
fn into_handler(self, settings: ServerSettings) -> HttpApplication<S>[src]
Convert into HttpHandler object.