pub struct Entry { /* private fields */ }Expand description
A single password entry
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn remove_field(&mut self, key: &str)
pub fn remove_field(&mut self, key: &str)
Remove a field by its key
If there are duplicate fields, removes them all
Sourcepub fn new_version(&mut self)
pub fn new_version(&mut self)
Generate a new version of this entry, pushing the current state to history
Sourcepub fn fields_mut(&mut self) -> impl Iterator<Item = &mut Field>
pub fn fields_mut(&mut self) -> impl Iterator<Item = &mut Field>
Iterate through all the field mutably
Sourcepub fn history_mut(&mut self) -> &mut History
pub fn history_mut(&mut self) -> &mut History
Iterate through all the field mutably
Sourcepub fn find_mut(&mut self, key: &str) -> Option<&mut Field>
pub fn find_mut(&mut self, key: &str) -> Option<&mut Field>
Find a field in this entry with a given key
Sourcepub fn set_username<S: ToString>(&mut self, username: S)
pub fn set_username<S: ToString>(&mut self, username: S)
Set the username of this entry
Sourcepub fn set_password<S: ToString>(&mut self, password: S)
pub fn set_password<S: ToString>(&mut self, password: S)
Set the password of this entry
Trait Implementations§
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 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
Mutably borrows from an owned value. Read more