Enum http_sig::PseudoHeader
source · #[non_exhaustive]pub enum PseudoHeader {
RequestTarget,
Created,
Expires,
}
Expand description
Pseudo-headers are used to incorporate additional information into a HTTP signature for which there is no corresponding HTTP header.
They are described as “special headers” in the draft specification: https://tools.ietf.org/id/draft-cavage-http-signatures-12.html#canonicalization
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RequestTarget
The (request-target)
pseudo-header is constructed by joining the lower-cased
request method (get
, post
, etc.) and the request path (/some/page?foo=1
)
with a single space character.
For example:
get /index.html
Created
Passed as part of the auth header
Expires
Passed as part of the auth header
Implementations§
Trait Implementations§
source§impl Clone for PseudoHeader
impl Clone for PseudoHeader
source§fn clone(&self) -> PseudoHeader
fn clone(&self) -> PseudoHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PseudoHeader
impl Debug for PseudoHeader
source§impl From<PseudoHeader> for Header
impl From<PseudoHeader> for Header
source§fn from(other: PseudoHeader) -> Self
fn from(other: PseudoHeader) -> Self
Converts to this type from the input type.
source§impl FromStr for PseudoHeader
impl FromStr for PseudoHeader
source§impl Ord for PseudoHeader
impl Ord for PseudoHeader
source§fn cmp(&self, other: &PseudoHeader) -> Ordering
fn cmp(&self, other: &PseudoHeader) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<PseudoHeader> for PseudoHeader
impl PartialEq<PseudoHeader> for PseudoHeader
source§fn eq(&self, other: &PseudoHeader) -> bool
fn eq(&self, other: &PseudoHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PseudoHeader> for PseudoHeader
impl PartialOrd<PseudoHeader> for PseudoHeader
source§fn partial_cmp(&self, other: &PseudoHeader) -> Option<Ordering>
fn partial_cmp(&self, other: &PseudoHeader) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for PseudoHeader
impl Eq for PseudoHeader
impl StructuralEq for PseudoHeader
impl StructuralPartialEq for PseudoHeader
Auto Trait Implementations§
impl RefUnwindSafe for PseudoHeader
impl Send for PseudoHeader
impl Sync for PseudoHeader
impl Unpin for PseudoHeader
impl UnwindSafe for PseudoHeader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.