Expand description
An extensible Header that provides only algorithm field and allows for additional fields to be passed in via a struct that can be serialized and deserialized. Unlike the Claims struct, there is no convenience type alias because headers seem to vary much more greatly in practice depending on the application whereas claims seem to be shared as a function of registerest and public claims.
Fields
alg: Algorithm
headers: Option<T>
Implementations
sourceimpl<T: Serialize + DeserializeOwned> Header<T>
impl<T: Serialize + DeserializeOwned> Header<T>
Trait Implementations
sourceimpl<'de, T> Deserialize<'de> for Header<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Header<T> where
T: Deserialize<'de>,
sourcefn 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
impl<T> StructuralPartialEq for Header<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Header<T> where
T: RefUnwindSafe,
impl<T> Send for Header<T> where
T: Send,
impl<T> Sync for Header<T> where
T: Sync,
impl<T> Unpin for Header<T> where
T: Unpin,
impl<T> UnwindSafe for Header<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more