Skip to main content

SecretValue

Trait SecretValue 

Source
pub trait SecretValue:
    Sized
    + Send
    + Sync
    + 'static {
    // Required method
    fn from_bytes(bytes: &[u8]) -> Result<Self, Error>;
}
Expand description

A type a secret’s value can be read as.

Required Methods§

Source

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>

Reads the value from the secret’s bytes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SecretValue for String

Source§

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>

Source§

impl SecretValue for Vec<u8>

Source§

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>

Implementors§

Source§

impl<T: DeserializeOwned + Send + Sync + 'static> SecretValue for Json<T>