Struct torn_key_pool::send::PoolBuilder
source · pub struct PoolBuilder<C, S>where
C: ApiClient,
S: KeyPoolStorage,{ /* private fields */ }Implementations§
source§impl<C, S> PoolBuilder<C, S>where
C: ApiClient,
S: KeyPoolStorage,
impl<C, S> PoolBuilder<C, S>where
C: ApiClient,
S: KeyPoolStorage,
pub fn new(client: C, storage: S) -> Self
pub fn comment(self, c: impl ToString) -> Self
pub fn hook_before<A>(
self,
hook: impl Fn(&mut ApiRequest<A>, &KeySelector<S::Key, S::Domain>) + Send + Sync + 'static
) -> Selfwhere
A: ApiSelection + 'static,
pub fn hook_after<A>(
self,
hook: impl Fn(&A::Response, &KeySelector<S::Key, S::Domain>) -> Result<(), KeyAction<S::Domain>> + Send + Sync + 'static
) -> Selfwhere
A: ApiSelection + 'static,
pub fn build(self) -> KeyPool<C, S>
Auto Trait Implementations§
impl<C, S> Freeze for PoolBuilder<C, S>
impl<C, S> !RefUnwindSafe for PoolBuilder<C, S>
impl<C, S> Send for PoolBuilder<C, S>
impl<C, S> Sync for PoolBuilder<C, S>
impl<C, S> Unpin for PoolBuilder<C, S>
impl<C, S> !UnwindSafe for PoolBuilder<C, S>
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