pub trait AlgorithmSignature: Sized {
// Required methods
fn try_from_slice(slice: &[u8]) -> Result<Self>;
fn as_bytes(&self) -> Cow<'_, [u8]>;
}Expand description
Signature for a certain JWT signing Algorithm.
We require that signature can be restored from a byte slice, and can be represented as a byte slice.
Required Methods§
Sourcefn try_from_slice(slice: &[u8]) -> Result<Self>
fn try_from_slice(slice: &[u8]) -> Result<Self>
Attempts to restore a signature from a byte slice. This method may fail if the slice is malformed (e.g., has a wrong length).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".