pub trait KeyMaterial:
Sealed
+ Clone
+ Send
+ Sync
+ 'static {
const ENTRY: &'static str;
const FILE: StoreFile;
// Required methods
fn to_secret_bytes(&self) -> SecretBytes;
fn from_secret_bytes(bytes: &[u8]) -> Result<Self, MaterialError>;
}Expand description
What custody keeps: the store keys or the member’s identity. Sealed: coven alone says how each is named and encoded.
Required Associated Constants§
Required Methods§
Sourcefn to_secret_bytes(&self) -> SecretBytes
fn to_secret_bytes(&self) -> SecretBytes
Encode it for custody.
Sourcefn from_secret_bytes(bytes: &[u8]) -> Result<Self, MaterialError>
fn from_secret_bytes(bytes: &[u8]) -> Result<Self, MaterialError>
Decode what to_secret_bytes encoded.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.