[−][src]Struct hawk::RequestBuilder
Methods
impl<'a> RequestBuilder<'a>
[src]
pub fn new(method: &'a str, host: &'a str, port: u16, path: &'a str) -> Self
[src]
Create a new request with the given method, host, port, and path.
pub fn from_url(method: &'a str, url: &'a Url) -> Result<Self>
[src]
Create a new request with the host, port, and path determined from the URL.
pub fn method(self, method: &'a str) -> Self
[src]
Set the request method. This should be a capitalized string.
pub fn path(self, path: &'a str) -> Self
[src]
Set the URL path for the request.
pub fn host(self, host: &'a str) -> Self
[src]
Set the URL hostname for the request
pub fn port(self, port: u16) -> Self
[src]
Set the URL port for the request
pub fn url(self, url: &'a Url) -> Result<Self>
[src]
Set the hostname, port, and path for the request, from a string URL.
pub fn hash<H: Into<Option<&'a [u8]>>>(self, hash: H) -> Self
[src]
Set the content hash for the request
pub fn ext<S: Into<Option<&'a str>>>(self, ext: S) -> Self
[src]
Set the ext
Hawk property for the request
pub fn app<S: Into<Option<&'a str>>>(self, app: S) -> Self
[src]
Set the app
Hawk property for the request
pub fn dlg<S: Into<Option<&'a str>>>(self, dlg: S) -> Self
[src]
Set the dlg
Hawk property for the request
pub fn request(self) -> Request<'a>
[src]
Get the request from this builder
pub fn extract_bewit(self, bewit: &mut Option<Bewit<'a>>) -> Result<Self>
[src]
Extract the bewit
query parameter, if any, from the path, and return it in the output
parameter, returning a modified RequestBuilder omitting the bewit=..
query parameter. If
no bewit is present, or if an error is returned, the output parameter is reset to None.
The path manipulation is tested to correspond to that preformed by the hueniverse/hawk implementation-specification
Trait Implementations
impl<'a> Clone for RequestBuilder<'a>
[src]
fn clone(&self) -> RequestBuilder<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for RequestBuilder<'a>
[src]
Auto Trait Implementations
impl<'a> Send for RequestBuilder<'a>
impl<'a> Sync for RequestBuilder<'a>
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,