pub struct ConnResponseWriter<W: Write + Send> { /* private fields */ }Expand description
A ResponseWriter that writes to an arbitrary Write (a TCP connection).
Implementations§
Trait Implementations§
Source§impl<W: Write + Send> ResponseWriter for ConnResponseWriter<W>
impl<W: Write + Send> ResponseWriter for ConnResponseWriter<W>
Source§fn header(&mut self) -> &mut Header
fn header(&mut self) -> &mut Header
Access the response headers (call before
write_header or first write).Source§fn write(&mut self, buf: &[u8]) -> Result<usize, HttpError>
fn write(&mut self, buf: &[u8]) -> Result<usize, HttpError>
Write body bytes. Implicitly calls
write_header(200) on the first call.Source§fn write_header(&mut self, status_code: u16)
fn write_header(&mut self, status_code: u16)
Send the status code and headers. Can only be called once; subsequent
calls are ignored.
Auto Trait Implementations§
impl<W> Freeze for ConnResponseWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for ConnResponseWriter<W>where
W: RefUnwindSafe,
impl<W> Send for ConnResponseWriter<W>
impl<W> Sync for ConnResponseWriter<W>where
W: Sync,
impl<W> Unpin for ConnResponseWriter<W>where
W: Unpin,
impl<W> UnsafeUnpin for ConnResponseWriter<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for ConnResponseWriter<W>where
W: UnwindSafe,
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