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,
body_shared: Arc<H2BodyShared>,
headers_tx: Sender<Result<(u16, Vec<(String, String)>)>>,
},
OpenWebSocketTunnel {
uri: Uri,
headers: Vec<(String, String)>,
response_tx: Sender<Result<H2Tunnel>>,
},
SendTunnelData {
stream_id: u32,
outbound: H2TunnelOutbound,
},
}Expand description
Command sent from handle to driver
Variants§
SendRequest
Send a request and get response via oneshot Driver allocates stream_id
Fields
§
response_tx: Sender<Result<StreamResponse>>SendStreamingRequest
Send a request with a streaming body
OpenWebSocketTunnel
Open an RFC 8441 WebSocket tunnel on a pooled HTTP/2 stream.
SendTunnelData
Queue outbound DATA for an open RFC 8441 tunnel.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DriverCommand
impl !RefUnwindSafe for DriverCommand
impl Send for DriverCommand
impl !Sync for DriverCommand
impl Unpin for DriverCommand
impl UnsafeUnpin for DriverCommand
impl !UnwindSafe 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