pub struct Store {
pub id: String,
pub delimiters: [String; 3],
pub service_no_divider: bool,
}
Expand description
The builder for keyutils credentials
Fields§
§id: String
§delimiters: [String; 3]
§service_no_divider: bool
Implementations§
Source§impl Store
impl Store
Sourcepub fn new() -> Result<Arc<Self>>
pub fn new() -> Result<Arc<Self>>
Create the default store: prefix keyring:
, divider ‘@’, no suffix.
This is the configuration that matches the legacy keyring for this store.
Sourcepub fn new_with_configuration(config: &HashMap<&str, &str>) -> Result<Arc<Self>>
pub fn new_with_configuration(config: &HashMap<&str, &str>) -> Result<Arc<Self>>
Create a custom-configured store.
The delimiter config options are prefix
, divider
, and suffix
. They
default to keyring:
, @
, and the empty string, respectively.
If you want to be sure that key descriptions cannot be ambiguous, specify
the config option service_no_divider
to true
.
Trait Implementations§
Source§impl CredentialStoreApi for Store
impl CredentialStoreApi for Store
Source§fn build(
&self,
service: &str,
user: &str,
modifiers: Option<&HashMap<&str, &str>>,
) -> Result<Entry>
fn build( &self, service: &str, user: &str, modifiers: Option<&HashMap<&str, &str>>, ) -> Result<Entry>
See the keyring-core API docs.
Building a credential does not create a key in the store. It’s setting a password that does that.
Source§fn persistence(&self) -> CredentialPersistence
fn persistence(&self) -> CredentialPersistence
See the keyring-core API docs.
Since this keystore keeps credentials in kernel memory, they vanish on reboot
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnwindSafe for Store
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