pub struct RequestHead {
pub method: Method,
pub target: String,
pub headers: HeaderMap,
}Expand description
A request head: method, origin-form target and headers.
The body is passed separately to crate::write_request so the caller
controls its length; a Content-Length header is written for a present body
and never for an absent one.
Fields§
§method: Method§target: StringOrigin-form target (/v1/chat/completions); the authority lives in the
connection, not the message.
headers: HeaderMapImplementations§
Trait Implementations§
Source§impl Clone for RequestHead
impl Clone for RequestHead
Source§fn clone(&self) -> RequestHead
fn clone(&self) -> RequestHead
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RequestHead
impl RefUnwindSafe for RequestHead
impl Send for RequestHead
impl Sync for RequestHead
impl Unpin for RequestHead
impl UnsafeUnpin for RequestHead
impl UnwindSafe for RequestHead
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