pub struct KeychainEntry { /* private fields */ }Expand description
Wraps a generic-password identity used with SecItem queries.
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
Wraps the corresponding generic-password operation built on SecItem.
Sourcepub fn account(&self) -> &str
pub fn account(&self) -> &str
Wraps the corresponding generic-password operation built on SecItem.
Sourcepub fn service(&self) -> &str
pub fn service(&self) -> &str
Wraps the corresponding generic-password operation built on SecItem.
Sourcepub fn set(&self, secret: impl AsRef<[u8]>) -> Result<()>
pub fn set(&self, secret: impl AsRef<[u8]>) -> Result<()>
Wraps the corresponding generic-password operation built on SecItem.
Sourcepub fn get(&self) -> Result<SecretBytes>
pub fn get(&self) -> Result<SecretBytes>
Wraps the corresponding generic-password operation built on SecItem.
Trait Implementations§
Source§impl Clone for KeychainEntry
impl Clone for KeychainEntry
Source§impl Debug for KeychainEntry
impl Debug for KeychainEntry
impl Eq for KeychainEntry
Source§impl Hash for KeychainEntry
impl Hash for KeychainEntry
Source§impl PartialEq for KeychainEntry
impl PartialEq 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