Type Definition jws::header::HeadersMut
source · pub type HeadersMut<'a> = AvailableHeaders<&'a mut HeaderMap>;
Implementations
sourceimpl<'a> HeadersMut<'a>
impl<'a> HeadersMut<'a>
sourcepub fn insert<T>(&mut self, key: String, value: T) -> Option<JsonValue>where
JsonValue: From<T>,
pub fn insert<T>(&mut self, key: String, value: T) -> Option<JsonValue>where
JsonValue: From<T>,
Insert a value into either of the available headers.
If the protected header is available, the value is inserted into that one. Otherwise, it is inserted into the unprotected header.
If the value is inserted into the protected header but the key exists in the unprotected header, it is removed from the unprotected header.