pub struct SessionFamilyRecord {
pub family_id: SessionFamilyId,
pub subject_id: String,
pub created_at: SystemTime,
pub revoked: bool,
}Expand description
Repository-facing summary of a session family.
This view captures the minimum metadata needed for family-wide revocation and replay handling.
§Examples
use std::time::{Duration, SystemTime};
use webgates_sessions::session::{SessionFamilyId, SessionFamilyRecord};
let now = SystemTime::UNIX_EPOCH + Duration::from_secs(1_000);
let family = SessionFamilyRecord::new(SessionFamilyId::new(), "user-42", now);
assert!(family.is_active());
let revoked = family.revoked();
assert!(!revoked.is_active());Fields§
§family_id: SessionFamilyIdStable family identifier.
subject_id: StringStable subject identifier that owns the family.
created_at: SystemTimeCreation timestamp for the family.
revoked: boolWhether the full family has been revoked.
Implementations§
Source§impl SessionFamilyRecord
impl SessionFamilyRecord
Sourcepub fn new(
family_id: SessionFamilyId,
subject_id: impl Into<String>,
created_at: SystemTime,
) -> Self
pub fn new( family_id: SessionFamilyId, subject_id: impl Into<String>, created_at: SystemTime, ) -> Self
Creates a new active session-family record.
Trait Implementations§
Source§impl Clone for SessionFamilyRecord
impl Clone for SessionFamilyRecord
Source§fn clone(&self) -> SessionFamilyRecord
fn clone(&self) -> SessionFamilyRecord
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 SessionFamilyRecord
impl Debug for SessionFamilyRecord
Source§impl PartialEq for SessionFamilyRecord
impl PartialEq for SessionFamilyRecord
Source§fn eq(&self, other: &SessionFamilyRecord) -> bool
fn eq(&self, other: &SessionFamilyRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SessionFamilyRecord
impl StructuralPartialEq for SessionFamilyRecord
Auto Trait Implementations§
impl Freeze for SessionFamilyRecord
impl RefUnwindSafe for SessionFamilyRecord
impl Send for SessionFamilyRecord
impl Sync for SessionFamilyRecord
impl Unpin for SessionFamilyRecord
impl UnsafeUnpin for SessionFamilyRecord
impl UnwindSafe for SessionFamilyRecord
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