pub struct SessionValidator { /* private fields */ }Expand description
Guard for a periodic token-validation task.
Implementations§
Source§impl SessionValidator
impl SessionValidator
Sourcepub async fn shutdown(self) -> Result<(), Error>
pub async fn shutdown(self) -> Result<(), Error>
Cancels validation and waits for its task to finish.
§Errors
Returns the terminal validation error if the provider invalidated the
session, Error::AmbiguousSessionValidation when shutdown cancels an
admitted validation request, or Error::BackgroundTaskFailed if the
library-owned task panicked or was aborted unexpectedly.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Returns whether the validation task has stopped.
Trait Implementations§
Source§impl Debug for SessionValidator
impl Debug for SessionValidator
Source§impl Drop for SessionValidator
impl Drop for SessionValidator
Auto Trait Implementations§
impl !RefUnwindSafe for SessionValidator
impl !UnwindSafe for SessionValidator
impl Freeze for SessionValidator
impl Send for SessionValidator
impl Sync for SessionValidator
impl Unpin for SessionValidator
impl UnsafeUnpin for SessionValidator
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