pub struct SessionData {
pub id: String,
pub user_id: String,
pub ip_address: String,
pub user_agent: String,
pub device_name: String,
pub device_type: String,
pub fingerprint: String,
pub data: Value,
pub created_at: DateTime<Utc>,
pub last_active_at: DateTime<Utc>,
pub expires_at: DateTime<Utc>,
}Expand description
A snapshot of a session row as returned from the database.
Fields§
§id: StringUnique session identifier (ULID).
user_id: StringThe authenticated user’s identifier.
ip_address: StringIP address recorded at login.
user_agent: StringRaw User-Agent header recorded at login.
device_name: StringHuman-readable device name derived from the user agent (e.g. "Chrome on macOS").
device_type: StringDevice category: "desktop", "mobile", or "tablet".
fingerprint: StringSHA-256 fingerprint of the browser environment used to detect session hijacking.
data: ValueArbitrary JSON data attached to the session.
created_at: DateTime<Utc>When the session was created.
last_active_at: DateTime<Utc>When the session was last touched.
expires_at: DateTime<Utc>When the session expires.
Trait Implementations§
Source§impl Clone for SessionData
impl Clone for SessionData
Source§fn clone(&self) -> SessionData
fn clone(&self) -> SessionData
Returns a duplicate 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 SessionData
impl Debug for SessionData
Source§impl<'de> Deserialize<'de> for SessionData
impl<'de> Deserialize<'de> for SessionData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SessionData
impl RefUnwindSafe for SessionData
impl Send for SessionData
impl Sync for SessionData
impl Unpin for SessionData
impl UnsafeUnpin for SessionData
impl UnwindSafe for SessionData
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