pub trait InterfaceSink {
// Required methods
fn send_ty<T: Serialize>(
&mut self,
hdr: &HeaderSeq,
body: &T,
) -> Result<(), ()>;
fn send_raw(&mut self, hdr: &HeaderSeq, body: &[u8]) -> Result<(), ()>;
fn send_err(
&mut self,
hdr: &HeaderSeq,
err: ProtocolError,
) -> Result<(), ()>;
}Expand description
The “Sink” side of the interface.
This is typically held by a profile, and feeds data to the interface’s TX worker.
Required Methods§
fn send_ty<T: Serialize>(&mut self, hdr: &HeaderSeq, body: &T) -> Result<(), ()>
fn send_raw(&mut self, hdr: &HeaderSeq, body: &[u8]) -> Result<(), ()>
fn send_err(&mut self, hdr: &HeaderSeq, err: ProtocolError) -> Result<(), ()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".