Trait runa_io::traits::WriteMessage
pub trait WriteMessage {
// Required methods
fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>;
fn start_send<M>(self: Pin<&mut Self>, object_id: u32, msg: M)
where M: Serialize + Debug;
fn poll_flush(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>;
// Provided methods
fn send<'a, 'b, 'c, M>(
&'a mut self,
object_id: u32,
msg: M
) -> Send<'c, Self, M> ⓘ
where 'a: 'c,
'b: 'c,
M: Serialize + Unpin + Debug + 'b,
Self: Unpin { ... }
fn flush(&mut self) -> Flush<'_, Self> ⓘ
where Self: Unpin { ... }
}
Expand description
A trait for objects that can accept messages to be sent.
This is similar to Sink
, but instead of accepting only one type of
Items, it accepts any type that implements
Serialize
.
Required Methods§
fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<(), Error>>
Reserve space for a message