pub struct RequestBuilder { /* private fields */ }
Expand description
A builder to create a Request
.
This is only useful for direct request calling on a FirePit.
Implementations§
Source§impl RequestBuilder
impl RequestBuilder
Sourcepub fn address(self, addr: impl Into<SocketAddr>) -> Self
pub fn address(self, addr: impl Into<SocketAddr>) -> Self
Sets the address.
Sourcepub fn content_type(self, content_type: impl Into<ContentType>) -> Self
pub fn content_type(self, content_type: impl Into<ContentType>) -> Self
Sets the content type.
Sourcepub fn values_mut(&mut self) -> &mut HeaderValues
pub fn values_mut(&mut self) -> &mut HeaderValues
Returns HeaderValues
mutably.
Sourcepub fn serialize<S>(self, value: &S) -> Result<Self, SerializeError>
Available on crate feature json
only.
pub fn serialize<S>(self, value: &S) -> Result<Self, SerializeError>
json
only.Sets the body from a serialized value
Sourcepub fn serialize_query<S>(self, value: &S) -> Result<Self, SerializeError>
Available on crate feature query
only.
pub fn serialize_query<S>(self, value: &S) -> Result<Self, SerializeError>
query
only.Serializes the value to a query string and appends it to the path.
§Note
This replaces the previous query.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RequestBuilder
impl !RefUnwindSafe for RequestBuilder
impl Send for RequestBuilder
impl Sync for RequestBuilder
impl Unpin for RequestBuilder
impl !UnwindSafe for RequestBuilder
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