pub trait IgHttpClient: Send + Sync {
// Required methods
fn request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T, R>(
&'life0 self,
method: Method,
path: &'life1 str,
session: &'life2 IgSession,
body: Option<&'life3 T>,
version: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<R, AppError>> + Send + 'async_trait>>
where for<'de> R: DeserializeOwned + 'static + 'async_trait,
T: Serialize + Send + Sync + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn request_no_auth<'life0, 'life1, 'life2, 'life3, 'async_trait, T, R>(
&'life0 self,
method: Method,
path: &'life1 str,
body: Option<&'life2 T>,
version: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<R, AppError>> + Send + 'async_trait>>
where for<'de> R: DeserializeOwned + 'static + 'async_trait,
T: Serialize + Send + Sync + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Interface for the IG HTTP client
Required Methods§
Sourcefn request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T, R>(
&'life0 self,
method: Method,
path: &'life1 str,
session: &'life2 IgSession,
body: Option<&'life3 T>,
version: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<R, AppError>> + Send + 'async_trait>>where
for<'de> R: DeserializeOwned + 'static + 'async_trait,
T: Serialize + Send + Sync + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T, R>(
&'life0 self,
method: Method,
path: &'life1 str,
session: &'life2 IgSession,
body: Option<&'life3 T>,
version: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<R, AppError>> + Send + 'async_trait>>where
for<'de> R: DeserializeOwned + 'static + 'async_trait,
T: Serialize + Send + Sync + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Makes an HTTP request to the IG API
Sourcefn request_no_auth<'life0, 'life1, 'life2, 'life3, 'async_trait, T, R>(
&'life0 self,
method: Method,
path: &'life1 str,
body: Option<&'life2 T>,
version: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<R, AppError>> + Send + 'async_trait>>where
for<'de> R: DeserializeOwned + 'static + 'async_trait,
T: Serialize + Send + Sync + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn request_no_auth<'life0, 'life1, 'life2, 'life3, 'async_trait, T, R>(
&'life0 self,
method: Method,
path: &'life1 str,
body: Option<&'life2 T>,
version: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<R, AppError>> + Send + 'async_trait>>where
for<'de> R: DeserializeOwned + 'static + 'async_trait,
T: Serialize + Send + Sync + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Makes an unauthenticated HTTP request (for login)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.