actually implement new trait
This commit is contained in:
parent
3ecc302097
commit
da9c1b1563
2 changed files with 18 additions and 5 deletions
|
|
@ -128,7 +128,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub trait ApiClientExt: ApiClient {
|
||||
pub trait KeyPoolClient: ApiClient {
|
||||
fn with_pool<'a, S>(&'a self, domain: KeyDomain, storage: &'a S) -> KeyPoolExecutor<Self, S>
|
||||
where
|
||||
Self: Sized,
|
||||
|
|
@ -137,3 +137,9 @@ pub trait ApiClientExt: ApiClient {
|
|||
KeyPoolExecutor::new(self, storage, domain)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "reqwest")]
|
||||
impl KeyPoolClient for reqwest::Client {}
|
||||
|
||||
#[cfg(feature = "awc")]
|
||||
impl KeyPoolClient for awc::Client {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue