pub struct KerberosTime {
pub timestamp: u64,
}Expand description
Kerberos timestamp (seconds since epoch, integer-only).
Stored as a u64 for compatibility with the kernel timer subsystem. Kerberos GeneralizedTime format is “YYYYMMDDHHMMSSZ”.
Fields§
§timestamp: u64Seconds since Unix epoch
Implementations§
Source§impl KerberosTime
impl KerberosTime
Sourcepub const fn from_timestamp(ts: u64) -> Self
pub const fn from_timestamp(ts: u64) -> Self
Create from a Unix timestamp.
Sourcepub fn has_expired(&self) -> bool
pub fn has_expired(&self) -> bool
Check if this time has passed.
Sourcepub fn encode_generalized_time(&self) -> Vec<u8>
pub fn encode_generalized_time(&self) -> Vec<u8>
Encode as ASN.1 GeneralizedTime string.
Uses a simplified format: “YYYYMMDDHHMMSSZ”. This is an approximation since we derive date from epoch seconds using integer math only.
Trait Implementations§
Source§impl Clone for KerberosTime
impl Clone for KerberosTime
Source§fn clone(&self) -> KerberosTime
fn clone(&self) -> KerberosTime
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KerberosTime
impl Debug for KerberosTime
Source§impl Default for KerberosTime
impl Default for KerberosTime
Source§fn default() -> KerberosTime
fn default() -> KerberosTime
Returns the “default value” for a type. Read more
Source§impl Ord for KerberosTime
impl Ord for KerberosTime
Source§impl PartialEq for KerberosTime
impl PartialEq for KerberosTime
Source§impl PartialOrd for KerberosTime
impl PartialOrd for KerberosTime
Source§fn partial_cmp(&self, other: &KerberosTime) -> Option<Ordering>
fn partial_cmp(&self, other: &KerberosTime) -> Option<Ordering>
impl Copy for KerberosTime
impl Eq for KerberosTime
impl StructuralPartialEq for KerberosTime
Auto Trait Implementations§
impl Freeze for KerberosTime
impl RefUnwindSafe for KerberosTime
impl Send for KerberosTime
impl Sync for KerberosTime
impl Unpin for KerberosTime
impl UnwindSafe for KerberosTime
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)