#[non_exhaustive]pub struct Times {
pub creation: Option<NaiveDateTime>,
pub last_modification: Option<NaiveDateTime>,
pub last_access: Option<NaiveDateTime>,
pub expiry: Option<NaiveDateTime>,
pub location_changed: Option<NaiveDateTime>,
pub expires: Option<bool>,
pub usage_count: Option<usize>,
}Expand description
Timestamps for a Group or Entry
As the KeePass file format does not store time zone information and does not store sub-second precision, all times are stored as NaiveDateTime with second precision.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.creation: Option<NaiveDateTime>The time of creation
last_modification: Option<NaiveDateTime>The time of the last modification
last_access: Option<NaiveDateTime>The time of the last access
expiry: Option<NaiveDateTime>The time of expiration
location_changed: Option<NaiveDateTime>The time of the last location change, which is updated when an entry is moved to a different group.
expires: Option<bool>Whether the entry or group expires.
A None value indicates that the expiration status is not set
usage_count: Option<usize>The number of times the entry or group has been accessed.
Implementations§
Source§impl Times
impl Times
pub fn set_creation(&mut self, value: Option<NaiveDateTime>)
pub fn set_last_modification(&mut self, value: Option<NaiveDateTime>)
pub fn set_last_access(&mut self, value: Option<NaiveDateTime>)
pub fn set_expiry_time(&mut self, value: Option<NaiveDateTime>)
pub fn set_location_changed(&mut self, value: Option<NaiveDateTime>)
pub fn set_expires(&mut self, value: bool)
pub fn set_usage_count(&mut self, value: usize)
pub fn get_last_modification(&self) -> Option<NaiveDateTime>
pub fn get_creation(&self) -> Option<NaiveDateTime>
pub fn get_last_access(&self) -> Option<NaiveDateTime>
pub fn get_expiry_time(&self) -> Option<NaiveDateTime>
pub fn get_location_changed(&self) -> Option<NaiveDateTime>
pub fn get_expires(&self) -> bool
pub fn get_usage_count(&self) -> usize
pub fn now() -> NaiveDateTime
pub fn epoch() -> NaiveDateTime
pub fn new() -> Self
Trait Implementations§
impl Eq for Times
impl StructuralPartialEq for Times
Auto Trait Implementations§
impl Freeze for Times
impl RefUnwindSafe for Times
impl Send for Times
impl Sync for Times
impl Unpin for Times
impl UnsafeUnpin for Times
impl UnwindSafe for Times
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