pub struct KeychainEntry { /* private fields */ }Expand description
Typed generic-password keychain entry identified by (account, service).
Implementations§
Source§impl KeychainEntry
impl KeychainEntry
Sourcepub fn new(account: impl Into<String>, service: impl Into<String>) -> Self
pub fn new(account: impl Into<String>, service: impl Into<String>) -> Self
Create a typed generic-password keychain entry.
Sourcepub fn set(&self, password: &str) -> Result<()>
pub fn set(&self, password: &str) -> Result<()>
Upsert the password for this keychain entry.
§Errors
Returns an error if Security.framework rejects the item or the strings contain NUL bytes.
Trait Implementations§
Source§impl Clone for KeychainEntry
impl Clone for KeychainEntry
Source§fn clone(&self) -> KeychainEntry
fn clone(&self) -> KeychainEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 KeychainEntry
impl Debug for KeychainEntry
Source§impl Hash for KeychainEntry
impl Hash for KeychainEntry
Source§impl PartialEq for KeychainEntry
impl PartialEq for KeychainEntry
Source§fn eq(&self, other: &KeychainEntry) -> bool
fn eq(&self, other: &KeychainEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for KeychainEntry
impl StructuralPartialEq for KeychainEntry
Auto Trait Implementations§
impl Freeze for KeychainEntry
impl RefUnwindSafe for KeychainEntry
impl Send for KeychainEntry
impl Sync for KeychainEntry
impl Unpin for KeychainEntry
impl UnsafeUnpin for KeychainEntry
impl UnwindSafe for KeychainEntry
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