pub struct MockActionsApi { /* private fields */ }Available on crate feature
actions_api only.Implementations§
Source§impl MockActionsApi
impl MockActionsApi
Sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new method can still be called
like <MockX as TraitY>::new
Source§impl MockActionsApi
impl MockActionsApi
Sourcepub fn expect_execute_thing_action(&mut self) -> &mut Expectation
pub fn expect_execute_thing_action(&mut self) -> &mut Expectation
Create an Expectation for mocking the execute_thing_action method
Sourcepub fn expect_get_available_actions_for_thing(&mut self) -> &mut Expectation
pub fn expect_get_available_actions_for_thing(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_available_actions_for_thing method
Trait Implementations§
Source§impl ActionsApi for MockActionsApi
impl ActionsApi for MockActionsApi
Source§fn execute_thing_action<'thing_uid, 'action_uid, 'accept_language, 'request_body, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
action_uid: &'action_uid str,
accept_language: Option<&'accept_language str>,
request_body: Option<HashMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<String, Error<ExecuteThingActionError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'action_uid: 'async_trait,
'accept_language: 'async_trait,
'request_body: 'async_trait,
'life0: 'async_trait,
fn execute_thing_action<'thing_uid, 'action_uid, 'accept_language, 'request_body, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
action_uid: &'action_uid str,
accept_language: Option<&'accept_language str>,
request_body: Option<HashMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<String, Error<ExecuteThingActionError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'action_uid: 'async_trait,
'accept_language: 'async_trait,
'request_body: 'async_trait,
'life0: 'async_trait,
POST /actions/{thingUID}/{actionUid}
Source§fn get_available_actions_for_thing<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ThingActionDto>, Error<GetAvailableActionsForThingError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn get_available_actions_for_thing<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ThingActionDto>, Error<GetAvailableActionsForThingError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
GET /actions/{thingUID}
Source§impl Debug for MockActionsApi
impl Debug for MockActionsApi
Auto Trait Implementations§
impl Freeze for MockActionsApi
impl RefUnwindSafe for MockActionsApi
impl Send for MockActionsApi
impl Sync for MockActionsApi
impl Unpin for MockActionsApi
impl UnwindSafe for MockActionsApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more