[−][src]Struct hawk::Header
Representation of a Hawk Authorization
header value (the part following "Hawk ").
Headers can be derived froms trings using the FromStr
trait, and formatted into a
string using the fmt_header
method.
All fields are optional, although for specific purposes some fields must be present.
Fields
id: Option<String>
ts: Option<Timespec>
nonce: Option<String>
mac: Option<Mac>
ext: Option<String>
hash: Option<Vec<u8>>
app: Option<String>
dlg: Option<String>
Methods
impl Header
[src]
pub fn new<S>(
id: Option<S>,
ts: Option<Timespec>,
nonce: Option<S>,
mac: Option<Mac>,
ext: Option<S>,
hash: Option<Vec<u8>>,
app: Option<S>,
dlg: Option<S>
) -> Result<Header> where
S: Into<String>,
[src]
id: Option<S>,
ts: Option<Timespec>,
nonce: Option<S>,
mac: Option<Mac>,
ext: Option<S>,
hash: Option<Vec<u8>>,
app: Option<S>,
dlg: Option<S>
) -> Result<Header> where
S: Into<String>,
Create a new Header with the full set of Hawk fields.
This is a low-level funtion. Headers are more often created from Request or Responses.
Note that none of the string-formatted header components can contain the character \"
.
pub fn fmt_header(&self, f: &mut Formatter) -> Result
[src]
Format the header for transmission in an Authorization header, omitting the "Hawk "
prefix.
Trait Implementations
impl Clone for Header
[src]
fn clone(&self) -> Header
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Header> for Header
[src]
impl Debug for Header
[src]
impl Display for Header
[src]
impl FromStr for Header
[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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,