Struct endbasic_std::testutils::MockService [−][src]
pub struct MockService { /* fields omitted */ }Expand description
Service client implementation that allows specifying expectations on requests and yields the responses previously recorded into it.
Trait Implementations
Returns the “default value” for a type. Read more
fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
password: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
password: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sends an authentication request to the service with username and password to obtain an
access token for the session. Read more
fn login<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
access_token: &'life1 AccessToken,
request: &'life2 LoginRequest
) -> Pin<Box<dyn Future<Output = Result<LoginResult>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn login<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
access_token: &'life1 AccessToken,
request: &'life2 LoginRequest
) -> Pin<Box<dyn Future<Output = Result<LoginResult>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sends a login request to the server with a previously-acquired access_token.
fn get_files<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
access_token: &'life1 AccessToken,
username: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<GetFilesResponse>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_files<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
access_token: &'life1 AccessToken,
username: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<GetFilesResponse>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sends a request to the server to obtain the list of files owned by username with a
previously-acquired access_token. Read more
fn get_file<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
access_token: &'life1 AccessToken,
username: &'life2 str,
filename: &'life3 str,
request: &'life4 GetFileRequest
) -> Pin<Box<dyn Future<Output = Result<GetFileResponse>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn get_file<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
access_token: &'life1 AccessToken,
username: &'life2 str,
filename: &'life3 str,
request: &'life4 GetFileRequest
) -> Pin<Box<dyn Future<Output = Result<GetFileResponse>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Sends a request to the server to obtain the metadata and/or the contents of filename owned
by username as specified in request with a previously-acquired access_token. Read more
fn patch_file<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
access_token: &'life1 AccessToken,
username: &'life2 str,
filename: &'life3 str,
request: &'life4 PatchFileRequest
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn patch_file<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
access_token: &'life1 AccessToken,
username: &'life2 str,
filename: &'life3 str,
request: &'life4 PatchFileRequest
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Sends a request to the server to update the metadata and/or the contents of filename owned
by username as specified in request with a previously-acquired access_token. Read more
fn delete_file<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
access_token: &'life1 AccessToken,
username: &'life2 str,
filename: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn delete_file<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
access_token: &'life1 AccessToken,
username: &'life2 str,
filename: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Sends a request to the server to delete filename owned by username with a
previously-acquired access_token. Read more
Auto Trait Implementations
impl !RefUnwindSafe for MockService
impl Send for MockService
impl Sync for MockService
impl Unpin for MockService
impl !UnwindSafe for MockService
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more