pub struct Entry { /* private fields */ }
Implementations
sourceimpl Entry
impl Entry
sourcepub fn new(service: &str, user: &str) -> Result<Entry>
pub fn new(service: &str, user: &str) -> Result<Entry>
Create an entry for the given service and username. The default credential builder is used.
sourcepub fn new_with_target(target: &str, service: &str, user: &str) -> Result<Entry>
pub fn new_with_target(target: &str, service: &str, user: &str) -> Result<Entry>
Create an entry for the given target, service, and username. The default credential builder is used.
sourcepub fn new_with_credential(credential: Box<Credential>) -> Entry
pub fn new_with_credential(credential: Box<Credential>) -> Entry
Create an entry that uses the given platform credential for storage.
sourcepub fn set_password(&self, password: &str) -> Result<()>
pub fn set_password(&self, password: &str) -> Result<()>
Set the password for this entry.
sourcepub fn get_password(&self) -> Result<String>
pub fn get_password(&self) -> Result<String>
Retrieve the password saved for this entry.
Returns a NoEntry
error is there isn’t one.
sourcepub fn delete_password(&self) -> Result<()>
pub fn delete_password(&self) -> Result<()>
Delete the password for this entry.
pub fn get_credential(&self) -> &dyn Any
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl !UnwindSafe for Entry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more