pub trait InterfaceSink {
// Required methods
fn send_ty<T: Serialize>(
&mut self,
hdr: &CommonHeader,
apdx: Option<&AnyAllAppendix>,
body: &T,
) -> Result<(), ()>;
fn send_raw(
&mut self,
hdr: &CommonHeader,
hdr_raw: &[u8],
body: &[u8],
) -> Result<(), ()>;
fn send_err(
&mut self,
hdr: &CommonHeader,
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: &CommonHeader, apdx: Option<&AnyAllAppendix>, body: &T, ) -> Result<(), ()>
fn send_raw( &mut self, hdr: &CommonHeader, hdr_raw: &[u8], body: &[u8], ) -> Result<(), ()>
fn send_err(&mut self, hdr: &CommonHeader, err: ProtocolError) -> Result<(), ()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.