[−][src]Struct hawk::Bewit
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]
id: &'a str,
exp: SystemTime,
mac: Mac,
ext: Option<&'a str>
) -> Bewit<'a>
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> Clone for Bewit<'a>
[src]
fn clone(&self) -> 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]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,