pub enum JsonWebKey {
ECPrivateKey {
value: ECPrivateKey,
},
ECPublicKey {
value: ECPublicKey,
},
RSAPrivateKey {
value: Box<RSAPrivateKey>,
},
RSAPublicKey {
value: RSAPublicKey,
},
SymmetricKey {
value: SymmetricKey,
},
}
Expand description
A JSON Web Key
Variants§
ECPrivateKey
Fields
§
value: ECPrivateKey
ECPublicKey
Fields
§
value: ECPublicKey
RSAPrivateKey
Fields
§
value: Box<RSAPrivateKey>
RSAPublicKey
Fields
§
value: RSAPublicKey
SymmetricKey
Fields
§
value: SymmetricKey
Implementations§
Source§impl JsonWebKey
impl JsonWebKey
pub fn from_bytes(data: &[u8]) -> Result<JsonWebKey, Error>
pub fn ec_private_key(&self) -> Option<&ECPrivateKey>
pub fn ec_public_key(&self) -> Option<&ECPublicKey>
pub fn rsa_private_key(&self) -> Option<&RSAPrivateKey>
pub fn rsa_public_key(&self) -> Option<&RSAPublicKey>
pub fn symmetric_key(&self) -> Option<&SymmetricKey>
Trait Implementations§
Source§impl Clone for JsonWebKey
impl Clone for JsonWebKey
Source§fn clone(&self) -> JsonWebKey
fn clone(&self) -> JsonWebKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JsonWebKey
impl Debug for JsonWebKey
Source§impl<'de> Deserialize<'de> for JsonWebKey
impl<'de> Deserialize<'de> for JsonWebKey
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
Source§impl FromStr for JsonWebKey
impl FromStr for JsonWebKey
Source§impl PartialEq for JsonWebKey
impl PartialEq for JsonWebKey
Source§impl Serialize for JsonWebKey
impl Serialize for JsonWebKey
impl StructuralPartialEq for JsonWebKey
Auto Trait Implementations§
impl Freeze for JsonWebKey
impl RefUnwindSafe for JsonWebKey
impl Send for JsonWebKey
impl Sync for JsonWebKey
impl Unpin for JsonWebKey
impl UnwindSafe for JsonWebKey
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