[][src]Struct hawk::Bewit

pub struct Bewit<'a> { /* fields omitted */ }

A Bewit is a piece of data attached to a GET request that functions in place of a Hawk Authentication header. It contains an id, a timestamp, a MAC, and an optional ext value. These are available using accessor functions.

Methods

impl<'a> Bewit<'a>[src]

pub fn new(
    id: &'a str,
    exp: SystemTime,
    mac: Mac,
    ext: Option<&'a str>
) -> Bewit<'a>
[src]

Create a new Bewit with the given values.

See Request.make_bewit for an easier way to make a Bewit

pub fn to_str(&self) -> String[src]

Generate the fully-encoded string for this Bewit

pub fn id(&self) -> &str[src]

Get the Bewit's client identifier

pub fn exp(&self) -> SystemTime[src]

Get the expiration time of the bewit

pub fn mac(&self) -> &Mac[src]

Get the MAC included in the Bewit

pub fn ext(&self) -> Option<&str>[src]

Get the Bewit's ext field.

Trait Implementations

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

impl<'a> Clone for Bewit<'a>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

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

impl<'a> FromStr for Bewit<'a>[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

impl<'a> Send for Bewit<'a>

impl<'a> Sync for Bewit<'a>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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