Struct hawk::RequestBuilder
[−]
[src]
pub struct RequestBuilder<'a>(_);
Methods
impl<'a> RequestBuilder<'a>
[src]
fn new(method: &'a str, host: &'a str, port: u16, path: &'a str) -> Self
Create a new request with the given method, host, port, and path.
fn from_url(method: &'a str, url: &'a Url) -> Result<Self>
Create a new request with the host, port, and path determined from the URL.
fn method(self, method: &'a str) -> Self
Set the request method. This should be a capitalized string.
fn path(self, path: &'a str) -> Self
Set the URL path for the request.
fn host(self, host: &'a str) -> Self
Set the URL hostname for the request
fn port(self, port: u16) -> Self
Set the URL port for the request
fn url(self, url: &'a Url) -> Result<Self>
Set the hostname, port, and path for the request, from a string URL.
fn hash<H: Into<Option<&'a [u8]>>>(self, hash: H) -> Self
Set the content hash for the request
fn ext<S: Into<Option<&'a str>>>(self, ext: S) -> Self
Set the ext
Hawk property for the request
fn app<S: Into<Option<&'a str>>>(self, app: S) -> Self
Set the app
Hawk property for the request
fn dlg<S: Into<Option<&'a str>>>(self, dlg: S) -> Self
Set the dlg
Hawk property for the request
fn request(self) -> Request<'a>
Get the request from this builder
Trait Implementations
impl<'a> Debug for RequestBuilder<'a>
[src]
impl<'a> Clone for RequestBuilder<'a>
[src]
fn clone(&self) -> RequestBuilder<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more