[−][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]
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.
fn from_str(bewit: &str) -> Result<Bewit<'a>>
[src]
impl<'a> PartialEq<Bewit<'a>> for Bewit<'a>
[src]
impl<'a> StructuralPartialEq for Bewit<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Bewit<'a>
impl<'a> Send for Bewit<'a>
impl<'a> Sync for Bewit<'a>
impl<'a> Unpin for Bewit<'a>
impl<'a> UnwindSafe for Bewit<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,