Skip to content

Commit

Permalink
docs: update for SerializableSecret
Browse files Browse the repository at this point in the history
This type was unintentionally made public in #46

Since that was a few releases ago, I think it'd be probably best to keep it public.i

`redact` attempts to be stable, I don't want to risk breaking any code.
  • Loading branch information
eopb committed May 11, 2024
1 parent 50dbf86 commit e825219
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ impl<'de, T: Deserialize<'de>> Deserialize<'de> for Secret<T> {

/// A serializable type that contains a secret.
///
/// This abstraction enables [expose_secret] to be used to serialize both `Secret<T>` and
/// `Option<Secret<T>>`.
///
/// This type is currently private. If you feel that a public `SerializableSecret` could
/// be useful for your use case please open a PR :)
/// This abstraction enables [expose_secret] to be used to serialize both `Secret<T>`, `&Secret<T>`
/// and `Option<Secret<T>>`.
pub trait SerializableSecret<T> {
type Exposed<'a>: Serialize
where
Expand Down

0 comments on commit e825219

Please sign in to comment.