#[non_exhaustive]pub enum SessionEndCause {
TokenInvalidated {
reason: Option<String>,
},
AccountDisconnected,
ClientDisconnected {
reason: Option<String>,
},
TokenRefused(ErrorCode),
}Expand description
What ended the authorisation of a session.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TokenInvalidated
The server announced that the access token of the account is no longer valid, as happens once the token pair was refreshed elsewhere or the access was revoked.
AccountDisconnected
The server announced that it dropped the session of the account.
ClientDisconnected
The server announced that it ends the session of the application.
TokenRefused(ErrorCode)
The server refused the access token when the account was authorised again after a reconnection.
Trait Implementations§
Source§impl Clone for SessionEndCause
impl Clone for SessionEndCause
Source§impl Debug for SessionEndCause
impl Debug for SessionEndCause
Source§impl Display for SessionEndCause
impl Display for SessionEndCause
impl Eq for SessionEndCause
Source§impl Error for SessionEndCause
impl Error for SessionEndCause
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SessionEndCause
impl PartialEq for SessionEndCause
impl StructuralPartialEq for SessionEndCause
Auto Trait Implementations§
impl Forget for SessionEndCause
impl Freeze for SessionEndCause
impl Move for SessionEndCause
impl RefUnwindSafe for SessionEndCause
impl Send for SessionEndCause
impl Sync for SessionEndCause
impl Unpin for SessionEndCause
impl UnsafeUnpin for SessionEndCause
impl UnwindSafe for SessionEndCause
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