Struct tsukuyomi::local::LocalRequest [−][src]
pub struct LocalRequest<'a: 'b, 'b> { /* fields omitted */ }
A type which emulates an HTTP request from a peer.
Methods
impl<'a, 'b> LocalRequest<'a, 'b>
[src]
impl<'a, 'b> LocalRequest<'a, 'b>
pub fn method<M>(&mut self, method: M) -> &mut LocalRequest<'a, 'b> where
Method: HttpTryFrom<M>,
[src]
pub fn method<M>(&mut self, method: M) -> &mut LocalRequest<'a, 'b> where
Method: HttpTryFrom<M>,
Modifies the value of HTTP method of this request.
pub fn uri<U>(&mut self, uri: U) -> &mut LocalRequest<'a, 'b> where
Uri: HttpTryFrom<U>,
[src]
pub fn uri<U>(&mut self, uri: U) -> &mut LocalRequest<'a, 'b> where
Uri: HttpTryFrom<U>,
Modifies the value of URI of this request.
pub fn header<K, V>(&mut self, key: K, value: V) -> &mut LocalRequest<'a, 'b> where
HeaderName: HttpTryFrom<K>,
HeaderValue: HttpTryFrom<V>,
[src]
pub fn header<K, V>(&mut self, key: K, value: V) -> &mut LocalRequest<'a, 'b> where
HeaderName: HttpTryFrom<K>,
HeaderValue: HttpTryFrom<V>,
Inserts a header value into this request.
pub fn body(
&mut self,
body: impl Into<RequestBody>
) -> &mut LocalRequest<'a, 'b>
[src]
pub fn body(
&mut self,
body: impl Into<RequestBody>
) -> &mut LocalRequest<'a, 'b>
Sets a message body of this request.
pub fn execute(&mut self) -> Result<Response<Data>, CritError>
[src]
pub fn execute(&mut self) -> Result<Response<Data>, CritError>
Creates an HTTP request from the current configuration and retrieve its response.
Trait Implementations
impl<'a: 'b, 'b> Debug for LocalRequest<'a, 'b>
[src]
impl<'a: 'b, 'b> Debug for LocalRequest<'a, 'b>
Auto Trait Implementations
impl<'a, 'b> !Send for LocalRequest<'a, 'b>
impl<'a, 'b> !Send for LocalRequest<'a, 'b>
impl<'a, 'b> !Sync for LocalRequest<'a, 'b>
impl<'a, 'b> !Sync for LocalRequest<'a, 'b>