pub struct Entry { /* private fields */ }
Implementations§
source§impl 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.