pub struct KeyPool { /* private fields */ }Implementations§
Source§impl KeyPool
impl KeyPool
pub fn new(keys: Vec<String>) -> LlmixResult<Self>
pub fn select(&self) -> Result<String, KeyPoolExhaustedError>
pub fn rotate(&self)
pub fn mark_dead(&self, key: &str) -> LlmixResult<()>
pub fn is_exhausted(&self) -> bool
pub fn alive_count(&self) -> usize
pub fn total_count(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KeyPool
impl RefUnwindSafe for KeyPool
impl Send for KeyPool
impl Sync for KeyPool
impl Unpin for KeyPool
impl UnsafeUnpin for KeyPool
impl UnwindSafe for KeyPool
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