pub struct SessionTouch {
pub session_id: SessionId,
pub last_seen_at: SystemTime,
}Expand description
Input used to record session activity updates.
§Examples
use std::time::{Duration, SystemTime};
use webgates_sessions::session::{SessionId, SessionTouch};
let now = SystemTime::UNIX_EPOCH + Duration::from_secs(1_000);
let touch = SessionTouch::new(SessionId::new(), now);
assert_eq!(touch.last_seen_at, now);Fields§
§session_id: SessionIdSession to update.
last_seen_at: SystemTimeNew activity timestamp to persist.
Implementations§
Source§impl SessionTouch
impl SessionTouch
Sourcepub fn new(session_id: SessionId, last_seen_at: SystemTime) -> Self
pub fn new(session_id: SessionId, last_seen_at: SystemTime) -> Self
Creates a new session-touch input.
Trait Implementations§
Source§impl Clone for SessionTouch
impl Clone for SessionTouch
Source§fn clone(&self) -> SessionTouch
fn clone(&self) -> SessionTouch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SessionTouch
impl Debug for SessionTouch
Source§impl PartialEq for SessionTouch
impl PartialEq for SessionTouch
Source§fn eq(&self, other: &SessionTouch) -> bool
fn eq(&self, other: &SessionTouch) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SessionTouch
impl Eq for SessionTouch
impl StructuralPartialEq for SessionTouch
Auto Trait Implementations§
impl Freeze for SessionTouch
impl RefUnwindSafe for SessionTouch
impl Send for SessionTouch
impl Sync for SessionTouch
impl Unpin for SessionTouch
impl UnsafeUnpin for SessionTouch
impl UnwindSafe for SessionTouch
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