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>) -> HttpRequestBuilder
pub fn set_method( &mut self, method: impl Into<HttpMethod>, ) -> &mut HttpRequestBuilder
pub fn url(self, url: impl Into<Box<str>>) -> HttpRequestBuilder
pub fn set_url(&mut self, url: impl Into<Box<str>>) -> &mut HttpRequestBuilder
pub fn header( self, header: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> HttpRequestBuilder
pub fn set_header( &mut self, header: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> &mut HttpRequestBuilder
pub fn param( self, param: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> HttpRequestBuilder
pub fn set_param( &mut self, param: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> &mut HttpRequestBuilder
pub fn response_header( self, response_header: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> HttpRequestBuilder
pub fn set_response_header( &mut self, response_header: impl Into<Box<str>>, val: impl Into<Box<str>>, ) -> &mut HttpRequestBuilder
pub fn version(self, version: impl Into<f32>) -> HttpRequestBuilder
pub fn set_version( &mut self, version: impl Into<f32>, ) -> &mut HttpRequestBuilder
pub fn status(self, status: impl Into<u16>) -> HttpRequestBuilder
pub fn set_status(&mut self, status: impl Into<u16>) -> &mut HttpRequestBuilder
pub fn body(self, body: impl Into<Box<[u8]>>) -> HttpRequestBuilder
pub fn set_body( &mut self, body: impl Into<Box<[u8]>>, ) -> &mut HttpRequestBuilder
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