pub enum Encoding {
HexPem,
Base64Pem,
HexDer,
Base64Der,
}Expand description
Encoding format of the public key material
§Examples
use keycast::crypto::Encoding;
use std::str::FromStr;
let e = Encoding::HexPem;
assert_eq!(e.to_string(), "hxp");
let parsed: Encoding = "hxp".parse().unwrap();
assert_eq!(parsed, Encoding::HexPem);
// round-trip check
assert_eq!(parsed.to_string(), "hxp");Variants§
HexPem
PEM (text) encoded, hash computed over hex
Base64Pem
PEM (text) encoded, hash computed over base64
HexDer
DER (binary) encoded, hex representation
Base64Der
DER (binary) encoded, base64 representation
Trait Implementations§
impl Copy for Encoding
Source§impl<'de> Deserialize<'de> for Encoding
impl<'de> Deserialize<'de> for Encoding
Source§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
impl Eq for Encoding
impl StructuralPartialEq for Encoding
Auto Trait Implementations§
impl Freeze for Encoding
impl RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl UnsafeUnpin for Encoding
impl UnwindSafe for Encoding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more