pub enum Keyring {
// some variants omitted
}
Expand description
A Secret Service or file backed keyring implementation.
It will automatically use the file backend if the application is sandboxed and otherwise falls back to the DBus service.
The File backend requires a org.freedesktop.portal.Secret
implementation
to retrieve the key that will be used to encrypt the backend file.
Implementations§
source§impl Keyring
impl Keyring
sourcepub async fn unlock(&self) -> Result<()>
pub async fn unlock(&self) -> Result<()>
Unlock the used collection if using the Secret service.
The method does nothing if keyring is backed by a file backend.
sourcepub async fn lock(&self) -> Result<()>
pub async fn lock(&self) -> Result<()>
Lock the used collection if using the Secret service.
The method does nothing if keyring is backed by a file backend.
sourcepub async fn delete(&self, attributes: HashMap<&str, &str>) -> Result<()>
pub async fn delete(&self, attributes: HashMap<&str, &str>) -> Result<()>
Remove items that matches the attributes.
sourcepub async fn items(&self) -> Result<Vec<Item>>
pub async fn items(&self) -> Result<Vec<Item>>
Retrieve all the items.
If using the Secret Service, it will retrieve all the items in the
DEFAULT_COLLECTION
.