Struct diem_config::keys::ConfigKey [−][src]
pub struct ConfigKey<T: PrivateKey + Serialize> { /* fields omitted */ }Expand description
ConfigKey places a clonable wrapper around PrivateKeys for config purposes only. The only time configs have keys is either for testing or for low security requirements. Diem recommends that keys be stored in key managers. If we make keys unclonable, then the configs must be mutable and that becomes a requirement strictly as a result of supporting test environments, which is undesirable. Hence this internal wrapper allows for keys to be clonable but only from configs.
Implementations
Trait Implementations
impl<'de, T: PrivateKey + Serialize> Deserialize<'de> for ConfigKey<T> where
T: Deserialize<'de>,
impl<'de, T: PrivateKey + Serialize> Deserialize<'de> for ConfigKey<T> where
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for ConfigKey<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for ConfigKey<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self
Generates a hash used only for tests.