pub struct Entry {Show 13 fields
pub uuid: Uuid,
pub fields: HashMap<String, Value>,
pub autotype: Option<AutoType>,
pub tags: Vec<String>,
pub times: Times,
pub custom_data: CustomData,
pub icon_id: Option<usize>,
pub custom_icon_uuid: Option<Uuid>,
pub foreground_color: Option<Color>,
pub background_color: Option<Color>,
pub override_url: Option<String>,
pub quality_check: Option<bool>,
pub history: Option<History>,
}
Expand description
A database entry containing several key-value fields.
Fields§
§uuid: Uuid
§fields: HashMap<String, Value>
§autotype: Option<AutoType>
§times: Times
§custom_data: CustomData
§icon_id: Option<usize>
§custom_icon_uuid: Option<Uuid>
§foreground_color: Option<Color>
§background_color: Option<Color>
§override_url: Option<String>
§quality_check: Option<bool>
§history: Option<History>
Implementations§
source§impl<'a> Entry
impl<'a> Entry
sourcepub fn get(&'a self, key: &str) -> Option<&'a str>
pub fn get(&'a self, key: &str) -> Option<&'a str>
Get a field by name, taking care of unprotecting Protected values automatically
pub fn get_uuid(&'a self) -> &'a Uuid
sourcepub fn get_time(&self, key: &str) -> Option<&NaiveDateTime>
pub fn get_time(&self, key: &str) -> Option<&NaiveDateTime>
Get a timestamp field by name
Returning the chrono::NaiveDateTime which does not include timezone or UTC offset because KeePass clients typically store timestamps relative to the local time on the machine writing the data without including accurate UTC offset or timezone information.
sourcepub fn get_expiry_time(&self) -> Option<&NaiveDateTime>
pub fn get_expiry_time(&self) -> Option<&NaiveDateTime>
Convenience method for getting the time that the entry expires. This value is usually only meaningful/useful when expires == true
sourcepub fn get_raw_otp_value(&'a self) -> Option<&'a str>
pub fn get_raw_otp_value(&'a self) -> Option<&'a str>
Convenience method for getting the raw value of the ‘otp’ field
sourcepub fn get_title(&'a self) -> Option<&'a str>
pub fn get_title(&'a self) -> Option<&'a str>
Convenience method for getting the value of the ‘Title’ field
sourcepub fn get_username(&'a self) -> Option<&'a str>
pub fn get_username(&'a self) -> Option<&'a str>
Convenience method for getting the value of the ‘UserName’ field
sourcepub fn get_password(&'a self) -> Option<&'a str>
pub fn get_password(&'a self) -> Option<&'a str>
Convenience method for getting the value of the ‘Password’ field
sourcepub fn get_url(&'a self) -> Option<&'a str>
pub fn get_url(&'a self) -> Option<&'a str>
Convenience method for getting the value of the ‘URL’ field
sourcepub fn update_history(&mut self) -> bool
pub fn update_history(&mut self) -> bool
Adds the current version of the entry to the entry’s history and updates the last modification timestamp. The history will only be updated if the entry has uncommitted changes.
Returns whether or not a new history entry was added.
Trait Implementations§
source§impl PartialEq for Entry
impl PartialEq for Entry
source§impl Serialize for Entry
impl Serialize for Entry
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.