pub enum JwtEncodeSecret {
SharedSecret(EncodingKey, Algorithm),
RsaKey(EncodingKey, Algorithm),
EcdsaKey(EncodingKey, Algorithm),
}Variants§
A shared secret for HMAC algorithms.
RsaKey(EncodingKey, Algorithm)
An RSA private key in PEM format.
EcdsaKey(EncodingKey, Algorithm)
An ECDSA private key in PEM format.
Implementations§
Source§impl JwtEncodeSecret
impl JwtEncodeSecret
pub fn from_rsa_pem(pem: &[u8]) -> Result<Self, Error>
pub fn from_ec_pem(pem: &[u8]) -> Result<Self, Error>
Trait Implementations§
Source§impl Clone for JwtEncodeSecret
impl Clone for JwtEncodeSecret
Source§fn clone(&self) -> JwtEncodeSecret
fn clone(&self) -> JwtEncodeSecret
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 moreAuto Trait Implementations§
impl Freeze for JwtEncodeSecret
impl RefUnwindSafe for JwtEncodeSecret
impl Send for JwtEncodeSecret
impl Sync for JwtEncodeSecret
impl Unpin for JwtEncodeSecret
impl UnsafeUnpin for JwtEncodeSecret
impl UnwindSafe for JwtEncodeSecret
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