pub enum DriverCommand {
SendRequest {
method: Method,
uri: Uri,
headers: Headers,
body: Option<Bytes>,
response_tx: Sender<Result<StreamResponse>>,
},
SendStreamingRequest {
method: Method,
uri: Uri,
headers: Headers,
body: RequestBody,
headers_tx: Sender<Result<(u16, Headers)>>,
body_shared: Arc<H3BodyShared>,
},
OpenWebSocketTunnel {
uri: Uri,
headers: Vec<(String, String)>,
response_tx: Sender<Result<H3Tunnel>>,
},
}Expand description
Command sent from handle to driver.
Tunnel-data DATA frames do not flow through this control channel; they take a dedicated mpsc owned by the driver so a freshly issued streaming-request or tunnel-open is never queued behind a burst of in-flight RFC 9220 tunnel writes.
Variants§
SendRequest
Send a request and get response via oneshot.
Fields
SendStreamingRequest
Send a request and return headers as soon as they arrive, with DATA routed incrementally through the body channel.
OpenWebSocketTunnel
Open an RFC 9220 WebSocket-over-HTTP/3 tunnel.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DriverCommand
impl !RefUnwindSafe for DriverCommand
impl !Sync for DriverCommand
impl !UnwindSafe for DriverCommand
impl Send for DriverCommand
impl Unpin for DriverCommand
impl UnsafeUnpin for DriverCommand
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