Trait rpc_it::transport::AsyncFrameWrite
source · pub trait AsyncFrameWrite: Send + Sync + Unpin {
// Required method
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize>>;
// Provided methods
fn poll_start_write(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Result<()>> { ... }
fn poll_end_write(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Result<()>> { ... }
fn poll_flush(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Result<()>> { ... }
fn poll_shutdown(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Result<()>> { ... }
}
Expand description
A message writer trait, which is used to write message to the underlying transport layer.
Required Methods§
Provided Methods§
sourcefn poll_start_write(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Result<()>>
fn poll_start_write( self: Pin<&mut Self>, _cx: &mut Context<'_> ) -> Poll<Result<()>>
Called before writing a message
sourcefn poll_end_write(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Result<()>>
fn poll_end_write( self: Pin<&mut Self>, _cx: &mut Context<'_> ) -> Poll<Result<()>>
Called after writing single message