jwt::token::signed

Trait SignWithKey

Source
pub trait SignWithKey<T> {
    // Required method
    fn sign_with_key(self, key: &impl SigningAlgorithm) -> Result<T, Error>;
}
Expand description

Allow objects to be signed with a key.

Required Methods§

Source

fn sign_with_key(self, key: &impl SigningAlgorithm) -> Result<T, Error>

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.

Implementors§

Source§

impl<C: ToBase64> SignWithKey<String> for C

Source§

impl<H, C> SignWithKey<Token<H, C, Signed>> for Token<H, C, Unsigned>
where H: ToBase64 + JoseHeader, C: ToBase64,