Skip to content

Commit

Permalink
Tweak docs for release.
Browse files Browse the repository at this point in the history
  • Loading branch information
brotskydotcom committed Dec 4, 2023
1 parent 7ce2872 commit 0a56d58
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Thanks to the following for helping make this library better,
whether through contributing code, discussion, or bug reports!

- @Alexei-Barnes
- @benwr
- @bhkaminski
- @brotskydotcom
- @complexspaces
Expand Down
15 changes: 8 additions & 7 deletions src/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub trait CredentialApi {
/// so a second call to delete_password will return
/// a [NoEntry](crate::Error::NoEntry) error.
fn delete_password(&self) -> Result<()>;
/// Return the underlying concrete object cast to [Any](std::any::Any).
/// Return the underlying concrete object cast to [Any].
///
/// This allows clients
/// to downcast the credential to its concrete type so they
Expand All @@ -45,16 +45,17 @@ impl std::fmt::Debug for Credential {
/// A thread-safe implementation of the [Credential API](CredentialApi).
pub type Credential = dyn CredentialApi + Send + Sync;

/// How much persistence keystore entries have
/// A descriptor for the lifetime of stored credentials, returned from
/// a credential store's [persistence](CredentialBuilderApi::persistence) call.
#[non_exhaustive]
pub enum CredentialPersistence {
/// credentials vanish when the entry vanishes (stored in the entry)
/// Credentials vanish when the entry vanishes (stored in the entry)
EntryOnly,
/// credentials vanish when the process terminates (stored in process memory)
/// Credentials vanish when the process terminates (stored in process memory)
ProcessOnly,
/// credentials vanish when machine reboots (stored in kernel memory)
/// Credentials persist until the machine reboots (stored in kernel memory)
UntilReboot,
/// credentials persist until they are explicitly deleted (stored on disk)
/// Credentials persist until they are explicitly deleted (stored on disk)
UntilDelete,
}

Expand All @@ -65,7 +66,7 @@ pub trait CredentialBuilderApi {
/// This typically has no effect on the content of the underlying store.
/// A credential need not be persisted until its password is set.
fn build(&self, target: Option<&str>, service: &str, user: &str) -> Result<Box<Credential>>;
/// Return the underlying concrete object cast to [Any](std::any::Any).
/// Return the underlying concrete object cast to [Any].
///
/// Because credential builders need not have any internal structure,
/// this call is not so much for clients
Expand Down

0 comments on commit 0a56d58

Please sign in to comment.