pub struct KeyringEntry {
pub key: String,
pub(crate) entry: Arc<Entry>,
}Expand description
The representation of a keyring entry.
This struct is a simple wrapper around native::Entry that
holds a keyring entry key.
Fields§
§key: StringThe key of the keyring entry.
entry: Arc<Entry>The native keyring entry.
Implementations§
Source§impl KeyringEntry
impl KeyringEntry
Sourcepub async fn get_secret(&self) -> Result<String>
pub async fn get_secret(&self) -> Result<String>
Get the secret of the keyring entry.
Sourcepub async fn find_secret(&self) -> Result<Option<String>>
pub async fn find_secret(&self) -> Result<Option<String>>
Find the secret of the keyring entry.
Returns None in case the secret is not found.
Sourcepub async fn set_secret(&self, secret: impl ToString) -> Result<()>
pub async fn set_secret(&self, secret: impl ToString) -> Result<()>
(Re)set the secret of the keyring entry.
Sourcepub async fn try_with_secret(self, secret: impl ToString) -> Result<Self>
pub async fn try_with_secret(self, secret: impl ToString) -> Result<Self>
(Re)set the secret of the keyring entry, using the builder pattern.
Sourcepub async fn delete_secret(&self) -> Result<()>
pub async fn delete_secret(&self) -> Result<()>
Delete the secret of the keyring entry.
Trait Implementations§
Source§impl Clone for KeyringEntry
impl Clone for KeyringEntry
Source§fn clone(&self) -> KeyringEntry
fn clone(&self) -> KeyringEntry
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeyringEntry
impl Debug for KeyringEntry
Source§impl<'de> Deserialize<'de> for KeyringEntry
impl<'de> Deserialize<'de> for KeyringEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<KeyringEntry> for String
impl From<KeyringEntry> for String
Source§fn from(entry: KeyringEntry) -> Self
fn from(entry: KeyringEntry) -> Self
Converts to this type from the input type.
Source§impl PartialEq for KeyringEntry
impl PartialEq for KeyringEntry
Source§impl Serialize for KeyringEntry
impl Serialize for KeyringEntry
Source§impl TryFrom<String> for KeyringEntry
impl TryFrom<String> for KeyringEntry
impl Eq for KeyringEntry
Auto Trait Implementations§
impl Freeze for KeyringEntry
impl !RefUnwindSafe for KeyringEntry
impl Send for KeyringEntry
impl Sync for KeyringEntry
impl Unpin for KeyringEntry
impl !UnwindSafe for KeyringEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)