pub struct HttpRequestBuilder { /* private fields */ }
Implementations§
Source§impl HttpRequestBuilder
impl HttpRequestBuilder
pub fn build(self) -> Result<HttpRequest, &'static str>
pub fn method(self, method: impl Into<HttpMethod>) -> Self
pub fn set_method(&mut self, method: impl Into<HttpMethod>) -> &mut Self
pub fn url(self, url: impl Into<Box<str>>) -> Self
pub fn set_url(&mut self, url: impl Into<Box<str>>) -> &mut Self
pub fn header( self, header: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> Self
pub fn set_header( &mut self, header: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> &mut Self
pub fn param(self, param: impl Into<Box<str>>, val: impl Into<Box<str>>) -> Self
pub fn set_param( &mut self, param: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> &mut Self
pub fn response_header( self, response_header: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> Self
pub fn set_response_header( &mut self, response_header: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> &mut Self
pub fn version(self, version: impl Into<f32>) -> Self
pub fn set_version(&mut self, version: impl Into<f32>) -> &mut Self
pub fn stream(self, stream: impl Into<BufReader<Box<dyn HttpStream>>>) -> Self
pub fn set_stream( &mut self, stream: impl Into<BufReader<Box<dyn HttpStream>>>, ) -> &mut Self
pub fn status(self, status: impl Into<u16>) -> Self
pub fn set_status(&mut self, status: impl Into<u16>) -> &mut Self
pub fn body(self, body: impl Into<Box<[u8]>>) -> Self
pub fn set_body(&mut self, body: impl Into<Box<[u8]>>) -> &mut Self
Auto Trait Implementations§
impl Freeze for HttpRequestBuilder
impl !RefUnwindSafe for HttpRequestBuilder
impl !Send for HttpRequestBuilder
impl !Sync for HttpRequestBuilder
impl Unpin for HttpRequestBuilder
impl !UnwindSafe for HttpRequestBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more