pub struct NoOpHttpProvider;
Expand description
A no-op HTTP provider for testing
Trait Implementations§
Source§impl Clone for NoOpHttpProvider
impl Clone for NoOpHttpProvider
Source§fn clone(&self) -> NoOpHttpProvider
fn clone(&self) -> NoOpHttpProvider
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NoOpHttpProvider
impl Debug for NoOpHttpProvider
Source§impl HttpProvider for NoOpHttpProvider
impl HttpProvider for NoOpHttpProvider
Source§fn get<'life0, 'life1, 'async_trait, T>(
&'life0 self,
_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
T: DeserializeOwned + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait, T>(
&'life0 self,
_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
T: DeserializeOwned + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a GET request
Source§fn post<'life0, 'life1, 'life2, 'async_trait, T, B>(
&'life0 self,
_path: &'life1 str,
_body: &'life2 B,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
fn post<'life0, 'life1, 'life2, 'async_trait, T, B>( &'life0 self, _path: &'life1 str, _body: &'life2 B, ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
Execute a POST request with JSON body
Source§fn put<'life0, 'life1, 'life2, 'async_trait, T, B>(
&'life0 self,
_path: &'life1 str,
_body: &'life2 B,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
fn put<'life0, 'life1, 'life2, 'async_trait, T, B>( &'life0 self, _path: &'life1 str, _body: &'life2 B, ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
Execute a PUT request with JSON body
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a DELETE request
Source§fn post_binary<'life0, 'life1, 'life2, 'async_trait, B>(
&'life0 self,
_path: &'life1 str,
_body: &'life2 B,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
fn post_binary<'life0, 'life1, 'life2, 'async_trait, B>( &'life0 self, _path: &'life1 str, _body: &'life2 B, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
Execute a POST request that returns binary data
Source§fn set_session_token(&mut self, _token: Option<String>)
fn set_session_token(&mut self, _token: Option<String>)
Set the session token for authenticated requests
Source§fn set_timeout(&mut self, _timeout: Duration)
fn set_timeout(&mut self, _timeout: Duration)
Set the request timeout
Source§fn last_response_metadata(&self) -> Option<ResponseMetadata>
fn last_response_metadata(&self) -> Option<ResponseMetadata>
Get response metadata for the last request (optional)
Auto Trait Implementations§
impl Freeze for NoOpHttpProvider
impl RefUnwindSafe for NoOpHttpProvider
impl Send for NoOpHttpProvider
impl Sync for NoOpHttpProvider
impl Unpin for NoOpHttpProvider
impl UnwindSafe for NoOpHttpProvider
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