pub struct ReloadableAuth { /* private fields */ }Expand description
A reloadable auth backend that wraps another backend and allows hot-swapping. Uses parking_lot::RwLock which doesn’t poison on panic.
Implementations§
Source§impl ReloadableAuth
impl ReloadableAuth
Sourcepub fn new<A: AuthBackend + 'static>(auth: A) -> Self
pub fn new<A: AuthBackend + 'static>(auth: A) -> Self
Create a new reloadable auth with the given initial backend.
Sourcepub fn reload<A: AuthBackend + 'static>(&self, auth: A)
pub fn reload<A: AuthBackend + 'static>(&self, auth: A)
Replace the auth backend with a new one.
Trait Implementations§
Source§impl AuthBackend for ReloadableAuth
impl AuthBackend for ReloadableAuth
Auto Trait Implementations§
impl !Freeze for ReloadableAuth
impl !RefUnwindSafe for ReloadableAuth
impl Send for ReloadableAuth
impl Sync for ReloadableAuth
impl Unpin for ReloadableAuth
impl !UnwindSafe for ReloadableAuth
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