jwt_simple::algorithms

Trait ECDSAP256KeyPairLike

Source
pub trait ECDSAP256KeyPairLike {
    // Required methods
    fn jwt_alg_name() -> &'static str;
    fn key_pair(&self) -> &P256KeyPair;
    fn key_id(&self) -> &Option<String>;
    fn metadata(&self) -> &Option<KeyMetadata>;
    fn attach_metadata(&mut self, metadata: KeyMetadata) -> Result<(), Error>;

    // Provided method
    fn sign<CustomClaims: Serialize + DeserializeOwned>(
        &self,
        claims: JWTClaims<CustomClaims>,
    ) -> Result<String, Error> { ... }
}

Required Methods§

Source

fn jwt_alg_name() -> &'static str

Source

fn key_pair(&self) -> &P256KeyPair

Source

fn key_id(&self) -> &Option<String>

Source

fn metadata(&self) -> &Option<KeyMetadata>

Source

fn attach_metadata(&mut self, metadata: KeyMetadata) -> Result<(), Error>

Provided Methods§

Source

fn sign<CustomClaims: Serialize + DeserializeOwned>( &self, claims: JWTClaims<CustomClaims>, ) -> Result<String, 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§