pub struct SendRequest { /* private fields */ }Expand description
Sender of new requests.
See module level doc for an example.
Implementations§
Source§impl SendRequest
impl SendRequest
Sourcepub fn send_request(
&mut self,
req: Request<()>,
no_body: bool,
) -> Result<(ResponseFuture, SendStream), Error>
pub fn send_request( &mut self, req: Request<()>, no_body: bool, ) -> Result<(ResponseFuture, SendStream), Error>
Send a new request.
The nature of HTTP/1 means only one request can be sent at a time (no multiplexing). Each request sent before the next has finished will be queued.
The no_body argument indiciates there is no body to be sent. The returned SendStream
will not accept data if no_body is true.
Errors if the connection is closed.
Trait Implementations§
Source§impl Clone for SendRequest
impl Clone for SendRequest
Source§fn clone(&self) -> SendRequest
fn clone(&self) -> SendRequest
Returns a duplicate of the value. Read more
1.0.0 · 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 SendRequest
impl RefUnwindSafe for SendRequest
impl Send for SendRequest
impl Sync for SendRequest
impl Unpin for SendRequest
impl UnwindSafe for SendRequest
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