pub struct ResponseWriter<'a, W>where
W: AsyncWrite + Unpin,{ /* private fields */ }Expand description
Writer responsible for serialising responses onto the wire.
Implementations§
Source§impl<'a, W> ResponseWriter<'a, W>where
W: AsyncWrite + Unpin,
impl<'a, W> ResponseWriter<'a, W>where
W: AsyncWrite + Unpin,
Sourcepub fn new(writer: &'a mut W) -> Self
pub fn new(writer: &'a mut W) -> Self
Create a new writer referencing the underlying transport.
Sourcepub async fn write_continue(&mut self) -> Result<(), EncodeError>
pub async fn write_continue(&mut self) -> Result<(), EncodeError>
Emit an interim 100 Continue response.
Sourcepub async fn write_response(
&mut self,
response: &mut Response,
request_method: &Method,
directive: ConnectionDirective,
) -> Result<(), EncodeError>
pub async fn write_response( &mut self, response: &mut Response, request_method: &Method, directive: ConnectionDirective, ) -> Result<(), EncodeError>
Serialise the supplied response according to RFC 9112 framing rules.
Sourcepub async fn flush(&mut self) -> Result<(), EncodeError>
pub async fn flush(&mut self) -> Result<(), EncodeError>
Flush the underlying writer.
Auto Trait Implementations§
impl<'a, W> !UnwindSafe for ResponseWriter<'a, W>
impl<'a, W> Freeze for ResponseWriter<'a, W>
impl<'a, W> RefUnwindSafe for ResponseWriter<'a, W>where
&'a mut W: RefUnwindSafe,
impl<'a, W> Send for ResponseWriter<'a, W>
impl<'a, W> Sync for ResponseWriter<'a, W>
impl<'a, W> Unpin for ResponseWriter<'a, W>
impl<'a, W> UnsafeUnpin for ResponseWriter<'a, W>where
&'a mut W: UnsafeUnpin,
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