pub trait Auth<'a> {
// Required methods
fn access_token<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<String, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn to_json<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<String, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn base_api_url(&self) -> String;
fn user_agent(&self) -> String;
}Expand description
Trait for authentication methods
Required Methods§
fn access_token<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<String, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn to_json<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<String, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn base_api_url(&self) -> String
fn user_agent(&self) -> String
Implementations§
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".