Enum typed_session::SessionExpiry
source · pub enum SessionExpiry {
DateTime(DateTime<Utc>),
Never,
}
Expand description
The expiry of a session. Either a given date and time, or never.
Variants§
DateTime(DateTime<Utc>)
The session expires at the given date and time.
Never
The session never expires, unless it is explicitly deleted.
Trait Implementations§
source§impl Clone for SessionExpiry
impl Clone for SessionExpiry
source§fn clone(&self) -> SessionExpiry
fn clone(&self) -> SessionExpiry
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SessionExpiry
impl Debug for SessionExpiry
source§impl Hash for SessionExpiry
impl Hash for SessionExpiry
source§impl Ord for SessionExpiry
impl Ord for SessionExpiry
source§fn cmp(&self, other: &SessionExpiry) -> Ordering
fn cmp(&self, other: &SessionExpiry) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<SessionExpiry> for SessionExpiry
impl PartialEq<SessionExpiry> for SessionExpiry
source§fn eq(&self, other: &SessionExpiry) -> bool
fn eq(&self, other: &SessionExpiry) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SessionExpiry> for SessionExpiry
impl PartialOrd<SessionExpiry> for SessionExpiry
source§fn partial_cmp(&self, other: &SessionExpiry) -> Option<Ordering>
fn partial_cmp(&self, other: &SessionExpiry) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SessionExpiry
impl Eq for SessionExpiry
impl StructuralEq for SessionExpiry
impl StructuralPartialEq for SessionExpiry
Auto Trait Implementations§
impl RefUnwindSafe for SessionExpiry
impl Send for SessionExpiry
impl Sync for SessionExpiry
impl Unpin for SessionExpiry
impl UnwindSafe for SessionExpiry
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