pub trait FDomainTransport: StreamTrait<Item = Result<Box<[u8]>, Error>> + Send {
// Required method
fn poll_send_message(
self: Pin<&mut Self>,
msg: &[u8],
ctx: &mut Context<'_>,
) -> Poll<Result<(), Error>>;
}
Expand description
Implemented by objects which provide a transport over which we can speak the FDomain protocol.
The implementer must provide two things:
- An incoming stream of messages presented as
Vec<u8>
. This is provided via theStream
trait, which this trait requires. - A way to send messages. This is provided by implementing the
poll_send_message
method.