pub struct Entry {
pub fields: HashMap<String, Value<String>>,
pub autotype: Option<AutoType>,
pub tags: Vec<String>,
pub times: Times,
pub custom_data: HashMap<String, CustomDataItem>,
pub foreground_color: Option<Color>,
pub background_color: Option<Color>,
pub override_url: Option<String>,
pub quality_check: bool,
pub history: Option<History>,
/* private fields */
}Expand description
A database entry containing several key-value fields.
Fields§
§fields: HashMap<String, Value<String>>the key-value fields of this entry, such as username and password.
Common field names are available in crate::db::fields.
autotype: Option<AutoType>AutoType settings for this entry
tags associated with this entry
times: Timestimestamps for this entry
custom_data: HashMap<String, CustomDataItem>custom data items associated with this entry
foreground_color: Option<Color>foreground color for this entry
background_color: Option<Color>background color for this entry
override_url: Option<String>URL override for this entry
quality_check: boolwhether to enable password quality check for this entry
history: Option<History>history of this entry
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn get(&self, key: &str) -> Option<&str>
pub fn get(&self, key: &str) -> Option<&str>
Get a field by name, taking care of unprotecting Protected values automatically
Sourcepub fn set(&mut self, key: impl Into<String>, value: Value<String>)
pub fn set(&mut self, key: impl Into<String>, value: Value<String>)
Set a field’s value by name
Sourcepub fn set_unprotected(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
)
pub fn set_unprotected( &mut self, key: impl Into<String>, value: impl Into<String>, )
Set a field’s unprotected value by name
Sourcepub fn set_protected(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
)
pub fn set_protected( &mut self, key: impl Into<String>, value: impl Into<String>, )
Set a field’s protected value by name
Sourcepub fn get_raw_otp_value(&self) -> Option<&str>
pub fn get_raw_otp_value(&self) -> Option<&str>
Convenience method for getting the raw value of the ‘otp’ field
Sourcepub fn get_title(&self) -> Option<&str>
pub fn get_title(&self) -> Option<&str>
Convenience method for getting the value of the ‘Title’ field
Sourcepub fn get_username(&self) -> Option<&str>
pub fn get_username(&self) -> Option<&str>
Convenience method for getting the value of the ‘UserName’ field
Sourcepub fn get_password(&self) -> Option<&str>
pub fn get_password(&self) -> Option<&str>
Convenience method for getting the value of the ‘Password’ field