pub struct Item<'kc> {
pub record_type: RecordType,
pub record: &'kc Record,
/* private fields */
}Expand description
A password item: a record plus the schema needed to read it.
Fields§
§record_type: RecordType§record: &'kc RecordImplementations§
Source§impl<'kc> Item<'kc>
impl<'kc> Item<'kc>
pub fn number(&self) -> u32
pub fn attribute(&self, name: &str) -> Option<&'kc Value>
Sourcepub fn text(&self, name: &str) -> Option<String>
pub fn text(&self, name: &str) -> Option<String>
An attribute’s bytes as a string, NUL-trimmed.
pub fn number_attribute(&self, name: &str) -> Option<u32>
pub fn account(&self) -> Option<String>
pub fn service(&self) -> Option<String>
pub fn server(&self) -> Option<String>
pub fn label(&self) -> Option<String>
pub fn path(&self) -> Option<String>
pub fn port(&self) -> Option<u32>
pub fn volume(&self) -> Option<String>
pub fn address(&self) -> Option<String>
pub fn signature(&self) -> Option<String>
pub fn created(&self) -> Option<String>
pub fn modified(&self) -> Option<String>
Sourcepub fn display_attribute(&self, name: &str) -> Option<String>
pub fn display_attribute(&self, name: &str) -> Option<String>
An attribute rendered the way kc displays it.
Four-char codes are stored in integer fields (ptcl holds htps as
0x68747073); they read as text, so they are shown and matched as text.
Sourcepub fn attributes(&self) -> Vec<(&'kc str, &'kc Value)>
pub fn attributes(&self) -> Vec<(&'kc str, &'kc Value)>
Every attribute that has a value, for kc show.
Sourcepub fn has_secret(&self) -> bool
pub fn has_secret(&self) -> bool
True when the record carries an encrypted secret.
Trait Implementations§
Auto Trait Implementations§
impl<'kc> Freeze for Item<'kc>
impl<'kc> RefUnwindSafe for Item<'kc>
impl<'kc> Send for Item<'kc>
impl<'kc> Sync for Item<'kc>
impl<'kc> Unpin for Item<'kc>
impl<'kc> UnsafeUnpin for Item<'kc>
impl<'kc> UnwindSafe for Item<'kc>
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