Type Definition jws::header::Headers

source ·
pub type Headers<'a> = AvailableHeaders<&'a HeaderMap>;

Implementations

Get the protected header, if it is available.

Get the unprotected header, if it is available.

Get a parameter from either the protected or unprotected header, depending on which are available and which has the parameter.

If a parameter is found in the protected header, the unprotected header is not consulted anymore.

Get a required parameter from either header.

This is almost identical to get, except that this function returns a properly formatter error instead of an empty optional.

Get and deserialize a required parameter from either header.

This function delegates to get_required and deserializes the result into the desired type. Deserialization errors are reported as error::InvalidHeaderParam errors.