pub trait FrameEncoder {
type Error;
// Required methods
fn encode_replication(
&mut self,
frame: &ReplicationFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>;
fn encode_command_ack(
&mut self,
frame: &CommandAckFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>;
fn encode_command(
&mut self,
frame: &CommandFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>;
fn encode_command_dispatch(
&mut self,
frame: &CommandDispatchFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>;
fn encode_station_event(
&mut self,
frame: &StationEventFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>;
fn encode_barrier(
&mut self,
frame: &BarrierFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>;
}Expand description
Encodes frames into bytes.
Required Associated Types§
Required Methods§
Sourcefn encode_replication(
&mut self,
frame: &ReplicationFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>
fn encode_replication( &mut self, frame: &ReplicationFrame, out: &mut Vec<u8>, ) -> Result<(), Self::Error>
Encodes a replication frame into out.
Sourcefn encode_command_ack(
&mut self,
frame: &CommandAckFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>
fn encode_command_ack( &mut self, frame: &CommandAckFrame, out: &mut Vec<u8>, ) -> Result<(), Self::Error>
Encodes a command acknowledgement frame into out.
Sourcefn encode_command(
&mut self,
frame: &CommandFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>
fn encode_command( &mut self, frame: &CommandFrame, out: &mut Vec<u8>, ) -> Result<(), Self::Error>
Encodes a client command frame into out.
Sourcefn encode_command_dispatch(
&mut self,
frame: &CommandDispatchFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>
fn encode_command_dispatch( &mut self, frame: &CommandDispatchFrame, out: &mut Vec<u8>, ) -> Result<(), Self::Error>
Encodes an internal command dispatch frame into out.
Sourcefn encode_station_event(
&mut self,
frame: &StationEventFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>
fn encode_station_event( &mut self, frame: &StationEventFrame, out: &mut Vec<u8>, ) -> Result<(), Self::Error>
Encodes a cross-station event frame into out.
Sourcefn encode_barrier(
&mut self,
frame: &BarrierFrame,
out: &mut Vec<u8>,
) -> Result<(), Self::Error>
fn encode_barrier( &mut self, frame: &BarrierFrame, out: &mut Vec<u8>, ) -> Result<(), Self::Error>
Encodes a barrier frame into out.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".