pub struct MockTemplatesApi { /* private fields */ }Available on crate feature
templates_api only.Implementations§
Source§impl MockTemplatesApi
impl MockTemplatesApi
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 MockTemplatesApi
impl MockTemplatesApi
Sourcepub fn expect_get_template_by_id(&mut self) -> &mut Expectation
pub fn expect_get_template_by_id(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_template_by_id method
Sourcepub fn expect_get_templates(&mut self) -> &mut Expectation
pub fn expect_get_templates(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_templates method
Trait Implementations§
Source§impl Debug for MockTemplatesApi
impl Debug for MockTemplatesApi
Source§impl Default for MockTemplatesApi
impl Default for MockTemplatesApi
Source§impl TemplatesApi for MockTemplatesApi
impl TemplatesApi for MockTemplatesApi
Source§fn get_template_by_id<'template_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
template_uid: &'template_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<Template, Error<GetTemplateByIdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'template_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn get_template_by_id<'template_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
template_uid: &'template_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<Template, Error<GetTemplateByIdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'template_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
GET /templates/{templateUID}
Source§fn get_templates<'accept_language, 'life0, 'async_trait>(
&'life0 self,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Template>, Error<GetTemplatesError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn get_templates<'accept_language, 'life0, 'async_trait>(
&'life0 self,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Template>, Error<GetTemplatesError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
GET /templates
Auto Trait Implementations§
impl Freeze for MockTemplatesApi
impl RefUnwindSafe for MockTemplatesApi
impl Send for MockTemplatesApi
impl Sync for MockTemplatesApi
impl Unpin for MockTemplatesApi
impl UnwindSafe for MockTemplatesApi
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