pub struct ActiveSession {
pub id: String,
pub is_current: bool,
pub user_agent: String,
pub ip: String,
pub issued_at: Option<Timestamp>,
pub expires_at: Option<Timestamp>,
pub last_used_at: Option<Timestamp>,
}Fields§
§id: StringPublic id of the refresh token (matches auth_refresh_tokens.id).
Used by RevokeSession to identify which row to revoke.
is_current: boolTrue for the session this RPC was invoked on, so the UI can mark it “Current” and disable the revoke button (revoking yourself is just logout — the dedicated logout flow handles cookie cleanup correctly).
user_agent: StringCaptured at issue time. Surfaced in the device list as a human-readable string (“Chrome on macOS”, “Safari on iPhone”). The web layer parses to that shape for display; the raw UA header is what’s stored.
ip: StringCaptured at issue time. Empty string when unknown.
issued_at: Option<Timestamp>§expires_at: Option<Timestamp>§last_used_at: Option<Timestamp>Last time this token was rotated (i.e. the user actively used the app from this session). Zero when never rotated.
Trait Implementations§
Source§impl Clone for ActiveSession
impl Clone for ActiveSession
Source§fn clone(&self) -> ActiveSession
fn clone(&self) -> ActiveSession
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 ActiveSession
impl Debug for ActiveSession
Source§impl Default for ActiveSession
impl Default for ActiveSession
impl Eq for ActiveSession
Source§impl Hash for ActiveSession
impl Hash for ActiveSession
Source§impl Message for ActiveSession
impl Message for ActiveSession
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for ActiveSession
impl PartialEq for ActiveSession
impl StructuralPartialEq for ActiveSession
Auto Trait Implementations§
impl Freeze for ActiveSession
impl RefUnwindSafe for ActiveSession
impl Send for ActiveSession
impl Sync for ActiveSession
impl Unpin for ActiveSession
impl UnsafeUnpin for ActiveSession
impl UnwindSafe for ActiveSession
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