[][src]Struct shs::TestRequest

pub struct TestRequest { /* fields omitted */ }

Test request for calling Server::test_request.

Implementations

impl TestRequest[src]

pub fn new_with_body(s: &str, body: &[u8]) -> Result<TestRequest, Error>[src]

Create a new test request with the method, URL, and body set.

The input string should be in the format "METHOD /path". The path will automatically be expanded to a full URL: "http://example.com/path".

pub fn new_with_json<S: Serialize>(
    s: &str,
    body: &S
) -> Result<TestRequest, Error>
[src]

Create a new test request with the method, URL, and body set.

The input string should be in the format "METHOD /path". The path will automatically be expanded to a full URL: "http://example.com/path".

pub fn new(s: &str) -> Result<TestRequest, Error>[src]

Create a new test request with the method and URL set.

The input string should be in the format "METHOD /path". The path will automatically be expanded to a full URL: "http://example.com/path".

Trait Implementations

impl Clone for TestRequest[src]

impl Debug for TestRequest[src]

impl Eq for TestRequest[src]

impl PartialEq<TestRequest> for TestRequest[src]

impl StructuralEq for TestRequest[src]

impl StructuralPartialEq for TestRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.