pub struct Entry {
pub attachments: HashMap<String, Attachment>,
/* private fields */
}Expand description
A database entry containing several key-value fields.
Fields§
§attachments: HashMap<String, Attachment>Implementations§
Source§impl Entry
impl Entry
pub fn quality_check(&self) -> bool
pub fn previous_parent_group(&self) -> Option<Uuid>
pub fn custom_icon_uuid(&self) -> Option<Uuid>
pub fn custom_data(&self) -> &HashMap<String, CustomDataItem>
pub fn custom_data_mut(&mut self) -> &mut HashMap<String, CustomDataItem>
pub fn get_history(&self) -> &Option<History>
pub fn purge_history(&mut self)
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_autotype(&self) -> Option<&AutoType>
pub fn set_autotype(&mut self, autotype: Option<AutoType>)
Convenience method for getting tags Returns a Vec of tags
Sourcepub fn set_additional_attribute(
&mut self,
key: &str,
value: Option<&str>,
) -> Result<()>
pub fn set_additional_attribute( &mut self, key: &str, value: Option<&str>, ) -> Result<()>
Set or remove additional attributes (custom string data)
Sourcepub fn get_additional_attribute(&self, key: &str) -> Option<&str>
pub fn get_additional_attribute(&self, key: &str) -> Option<&str>
Get an additional attribute (custom string data)
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
pub fn set_username(&mut self, username: Option<&str>)
Sourcepub fn get_password(&self) -> Option<&str>
pub fn get_password(&self) -> Option<&str>
Convenience method for getting the value of the ‘Password’ field
pub fn set_password(&mut self, password: Option<&str>)
Sourcepub fn get_url(&self) -> Option<&str>
pub fn get_url(&self) -> Option<&str>
Convenience method for getting the value of the ‘URL’ field
pub fn set_url(&mut self, url: Option<&str>)
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 uncommited changes.
Returns whether or not a new history entry was added.
Source§impl<'a> Entry
impl<'a> Entry
Sourcepub fn get_otp(&'a self) -> Result<TOTP, TOTPError>
pub fn get_otp(&'a self) -> Result<TOTP, TOTPError>
Convenience method for getting a TOTP from this entry
pub fn set_otp(&mut self, otp: Option<&TOTP>)
Sourcepub fn set_raw_otp_value(&mut self, value: Option<&str>)
pub fn set_raw_otp_value(&mut self, value: Option<&str>)
Convenience method for setting a TOTP to this entry
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