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 handler2<H, M>(&mut self, handler: H, mw: M) where
H: Handler<S>,
M: Middleware<S>,
[src]
H: Handler<S>,
M: Middleware<S>,
Register handler for "/" with resource middleware
pub fn middleware<T>(&mut self, mw: T) -> &mut TestApp<S> where
T: Middleware<S> + 'static,
[src]
T: Middleware<S> + 'static,
Register middleware
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.