pub struct Request {
pub scheme: String,
pub host: String,
pub path: String,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
}Expand description
An outbound request to be sent by a transport.
Providers set scheme, host, and path. The transport assembles
the final URL — but may override the scheme when the protocol
requires it (e.g. a WebSocket transport uses wss:// regardless of
the provider-supplied scheme).
Fields§
§scheme: StringURL scheme, e.g. "https" or "http". Transports may override
this (e.g. a WebSocket transport ignores it and uses wss://).
host: StringHost (and optional port), e.g. "api.openai.com" or "localhost:11434".
path: StringAbsolute path, e.g. "/v1/responses".
headers: Vec<(String, String)>§body: Vec<u8>Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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