pub struct Http11Send { /* private fields */ }Expand description
I/O-free coroutine to send an HTTP/1.1 request and receive its response.
Implementations§
Source§impl Http11Send
impl Http11Send
Sourcepub fn new(req: HttpRequest) -> Self
pub fn new(req: HttpRequest) -> Self
Creates a new coroutine that will send the given request and receive its response.
Trait Implementations§
Source§impl Debug for Http11Send
impl Debug for Http11Send
Source§impl HttpCoroutine for Http11Send
impl HttpCoroutine for Http11Send
type Yield = HttpSendYield
type Return = Result<HttpSendOutput, Http11SendError>
Source§fn resume(
&mut self,
arg: Option<&[u8]>,
) -> HttpCoroutineState<Self::Yield, Self::Return>
fn resume( &mut self, arg: Option<&[u8]>, ) -> HttpCoroutineState<Self::Yield, Self::Return>
Advances one step. Pass
None initially or after HttpYield::WantsWrite;
pass Some(data) after HttpYield::WantsRead; pass Some(&[]) for EOF.Auto Trait Implementations§
impl Freeze for Http11Send
impl RefUnwindSafe for Http11Send
impl Send for Http11Send
impl Sync for Http11Send
impl Unpin for Http11Send
impl UnsafeUnpin for Http11Send
impl UnwindSafe for Http11Send
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