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<(), Option<Error>>>;
// Provided methods
fn debug_fmt(&self, _: &mut Formatter<'_>) -> Result { ... }
fn has_debug_fmt(&self) -> bool { ... }
}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 theStreamtrait, which this trait requires. - A way to send messages. This is provided by implementing the
poll_send_messagemethod.
Required Methods§
Provided Methods§
Sourcefn has_debug_fmt(&self) -> bool
fn has_debug_fmt(&self) -> bool
Whether debug_fmt does anything.