Enum http_sign::SignatureElement[][src]

pub enum SignatureElement<'a> {
    RequestTarget,
    Created,
    Expires,
    Header(&'a str),
}

An element that contributes to the signature calculation. Standard HTTP headers may be included in the signature, as well as special non-header fields such as (request-target), (created), and (expires). The list of signature elements passed to the sign function determines which parts of the HTTP message are protected by the signature. The order of signature elements that is chosen is also important in that it determines the order in which the signature input string is formed.

Variants

RequestTarget

The (request-target) special field. Results in the concatenation of the lowercase request method, an ASCII space, and the request path. Can be used with any algorithm.

RECOMMENDED.

Created

The (created) special field, indicating when the signature was created. Expressed as a Unix timestamp (at seconds granularity). Cannot be used with RSA, HMAC, or ECDSA algorithms.

OPTIONAL.

Expires

The (expires) special field, indicating when the signature will expire. Expressed as a Unix timestamp (at seconds granularity). Can be used with any algorithm.

OPTIONAL.

Header(&'a str)

A standard HTTP header element. Results in the header name being concatenated with the literal string “: “, followed by every corresponding value for the header being concatenated by “, “. The names of the headers specified must be all lower case.

Trait Implementations

impl<'a> Debug for SignatureElement<'a>[src]

impl<'a> Eq for SignatureElement<'a>[src]

impl<'a> PartialEq<SignatureElement<'a>> for SignatureElement<'a>[src]

impl<'a> StructuralEq for SignatureElement<'a>[src]

impl<'a> StructuralPartialEq for SignatureElement<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for SignatureElement<'a>

impl<'a> Send for SignatureElement<'a>

impl<'a> Sync for SignatureElement<'a>

impl<'a> Unpin for SignatureElement<'a>

impl<'a> UnwindSafe for SignatureElement<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.