[][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: Timespec,
    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) -> Timespec[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> 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, U> Into for T where
    U: From<T>, 
[src]

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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