pub struct ServerEntry {
pub token: String,
pub user: Option<String>,
pub acquired_at: Option<DateTime<Utc>>,
pub expires_at: Option<DateTime<Utc>>,
}Expand description
One entry in the cache — token plus optional metadata.
The Debug impl below is manual to redact the token. The struct holds a
secret; #[derive(Debug)] would expose it via any future tracing::debug!
or panic message that captured a ServerEntry. The user and timestamp
fields are not secrets and are shown in cleartext.
All new fields (user, acquired_at, expires_at) are Option<...> so
legacy auth.toml files from before v2 (token-only entries) still parse.
Fields§
§token: String§user: Option<String>§acquired_at: Option<DateTime<Utc>>§expires_at: Option<DateTime<Utc>>Trait Implementations§
Source§impl Debug for ServerEntry
impl Debug for ServerEntry
Source§impl<'de> Deserialize<'de> for ServerEntry
impl<'de> Deserialize<'de> for ServerEntry
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 ServerEntry
impl RefUnwindSafe for ServerEntry
impl Send for ServerEntry
impl Sync for ServerEntry
impl Unpin for ServerEntry
impl UnsafeUnpin for ServerEntry
impl UnwindSafe for ServerEntry
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