Struct actix_web::test::TestServer [−][src]
pub struct TestServer { /* fields omitted */ }Expand description
Test server controller
Implementations
Construct test server url
Create GET request
Create POST request
Create HEAD request
Create PUT request
Create PATCH request
Create DELETE request
Create OPTIONS request
Connect to test http server
pub async fn load_body<S>(
&mut self,
response: ClientResponse<S>
) -> Result<Bytes, PayloadError> where
S: Stream<Item = Result<Bytes, PayloadError>> + Unpin + 'static,
pub async fn ws_at(
&mut self,
path: &str
) -> Result<Framed<impl AsyncRead + AsyncWrite, Codec>, WsClientError>
pub async fn ws_at(
&mut self,
path: &str
) -> Result<Framed<impl AsyncRead + AsyncWrite, Codec>, WsClientError>
Connect to websocket server at a given path
pub async fn ws(
&mut self
) -> Result<Framed<impl AsyncRead + AsyncWrite, Codec>, WsClientError>
pub async fn ws(
&mut self
) -> Result<Framed<impl AsyncRead + AsyncWrite, Codec>, WsClientError>
Connect to a websocket server
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TestServer
impl !Send for TestServer
impl !Sync for TestServer
impl Unpin for TestServer
impl !UnwindSafe for TestServer
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
