pub struct ConnectionWriter { /* private fields */ }Expand description
A writer over a WriteHalf and BytesMut buffer.
Implementations§
Source§impl ConnectionWriter
impl ConnectionWriter
Sourcepub fn builder() -> ConnectionWriterBuilder
pub fn builder() -> ConnectionWriterBuilder
Create an instance of ConnectionWriter using the builder syntax
Source§impl ConnectionWriter
impl ConnectionWriter
Sourcepub async fn write_frame(&mut self, frame: &Frame) -> Result<()>
pub async fn write_frame(&mut self, frame: &Frame) -> Result<()>
Write a single Frame value to the underlying stream.
The Frame value is written to the socket using the various write_*
functions provided by AsyncWrite. Calling these functions directly on
a TcpStream is not advised, as this will result in a large number of
syscalls. However, it is fine to call these functions on a buffered
write stream. The data will be written to the buffer. Once the buffer is
full, it is flushed to the underlying socket.
§Errors
- I/O error.
- Encoding error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConnectionWriter
impl RefUnwindSafe for ConnectionWriter
impl Send for ConnectionWriter
impl Sync for ConnectionWriter
impl Unpin for ConnectionWriter
impl UnsafeUnpin for ConnectionWriter
impl UnwindSafe for ConnectionWriter
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