[−][src]Struct rusoto_mock::MockRequestDispatcher
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]
B: Serialize,
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]
F: Fn(&SignedRequest) + Send + Sync + 'static,
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]
fn default() -> MockRequestDispatcher
[src]
impl DispatchSignedRequest for MockRequestDispatcher
[src]
type Future = FutureResult<HttpResponse, HttpDispatchError>
The future response value.
fn dispatch(
&self,
request: SignedRequest,
_timeout: Option<Duration>
) -> Self::Future
[src]
&self,
request: SignedRequest,
_timeout: Option<Duration>
) -> Self::Future
Auto Trait Implementations
impl Send for MockRequestDispatcher
impl Sync for MockRequestDispatcher
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
impl<T> Erased for T
impl<T> Same for T
type Output = T
Should always be Self