[−][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
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, 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 = !
🔬 This is a nightly-only experimental API. (
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
🔬 This is a nightly-only experimental API. (
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,