[][src]Struct rusoto_mock::MockRequestDispatcher

pub struct MockRequestDispatcher { /* fields omitted */ }

Composes mock API responses

A Default is provided which returns an successful response with an empty body

These can be constructed using either a Default implementation or with the with_status function.

Methods

impl MockRequestDispatcher[src]

pub fn with_status(status: u16) -> MockRequestDispatcher[src]

Returns a instance that mocks the status code that would be returned from AWS

pub fn with_dispatch_error(error: HttpDispatchError) -> MockRequestDispatcher[src]

Mocks the service request failing with a communications error

pub fn with_body(self, body: &str) -> MockRequestDispatcher[src]

Mocks the service response body what would be returned from AWS

pub fn with_json_body<B>(self, body: B) -> MockRequestDispatcher where
    B: Serialize
[src]

Mocks the json serialized response body what would be returned from AWS

pub fn with_request_checker<F>(self, checker: F) -> MockRequestDispatcher where
    F: Fn(&SignedRequest) + Send + Sync + 'static, 
[src]

Mocks the signed request checking applied to a request before sending to AWS

pub fn with_header(self, key: &str, value: &str) -> MockRequestDispatcher[src]

Mocks a single service header that would be returned from AWS

Trait Implementations

impl Default for MockRequestDispatcher[src]

impl DispatchSignedRequest for MockRequestDispatcher[src]

type Future = FutureResult<HttpResponse, HttpDispatchError>

The future response value.

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self