#[non_exhaustive]pub struct SessionEnded {
pub account: Option<AccountId>,
pub cause: SessionEndCause,
}Expand description
A session that is no longer authorised on its connection.
Requests on the session fail with this error, without being sent, from the moment the server ends the authorisation until the session is authorised again.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.account: Option<AccountId>Account whose session ended; None when the session of the application ended, which
ends the sessions of all its accounts.
cause: SessionEndCauseWhat ended the authorisation.
Implementations§
Source§impl SessionEnded
impl SessionEnded
Sourcepub const fn new(account: Option<AccountId>, cause: SessionEndCause) -> Self
pub const fn new(account: Option<AccountId>, cause: SessionEndCause) -> Self
Describes the end of the session of account, or of the application for None.
Trait Implementations§
Source§impl Clone for SessionEnded
impl Clone for SessionEnded
Source§impl Debug for SessionEnded
impl Debug for SessionEnded
Source§impl Display for SessionEnded
impl Display for SessionEnded
impl Eq for SessionEnded
Source§impl Error for SessionEnded
impl Error for SessionEnded
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 From<SessionEnded> for ConnectorError
impl From<SessionEnded> for ConnectorError
Source§fn from(source: SessionEnded) -> Self
fn from(source: SessionEnded) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SessionEnded
impl PartialEq for SessionEnded
impl StructuralPartialEq for SessionEnded
Auto Trait Implementations§
impl Forget for SessionEnded
impl Freeze for SessionEnded
impl Move for SessionEnded
impl RefUnwindSafe for SessionEnded
impl Send for SessionEnded
impl Sync for SessionEnded
impl Unpin for SessionEnded
impl UnsafeUnpin for SessionEnded
impl UnwindSafe for SessionEnded
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