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_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 additional_attributes(&self) -> Vec<(String, String)>
pub fn additional_attributes(&self) -> Vec<(String, String)>
Get all additional string attributes stored directly on this entry.
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
Trait Implementations§
impl Eq for Entry
Source§impl Node for Entry
impl Node for Entry
fn duplicate(&self) -> NodePtr
fn get_uuid(&self) -> Uuid
fn set_uuid(&mut self, uuid: Uuid)
fn get_title(&self) -> Option<&str>
fn set_title(&mut self, title: Option<&str>)
fn get_notes(&self) -> Option<&str>
fn set_notes(&mut self, notes: Option<&str>)
fn get_icon(&self) -> Icon
fn set_icon(&mut self, icon: Icon)
fn get_times_mut(&mut self) -> &mut Times
fn get_parent(&self) -> Option<Uuid>
fn set_parent(&mut self, parent: Option<Uuid>)
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.