pub enum DriverCommand {
SendRequest {
method: Method,
uri: Uri,
headers: Vec<(String, String)>,
body: Option<Bytes>,
response_tx: Sender<Result<StreamResponse>>,
},
SendStreamingRequest {
method: Method,
uri: Uri,
headers: Vec<(String, String)>,
body_tx: Sender<Result<Bytes>>,
headers_tx: Sender<Result<(u16, Vec<(String, String)>)>>,
},
}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
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more