Skip to main content

PacketSink

Trait PacketSink 

Source
pub trait PacketSink {
    type Error;

    // Required method
    fn send_packet(&mut self, packet: &[u8]) -> Result<(), Self::Error>;
}
Expand description

Common packet-sink contract for transport adapters.

Required Associated Types§

Source

type Error

Sink-specific error type.

Required Methods§

Source

fn send_packet(&mut self, packet: &[u8]) -> Result<(), Self::Error>

Sends one packet byte slice without mutating or normalizing it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl PacketSink for Vec<Vec<u8>>

Source§

type Error = Error

Source§

fn send_packet(&mut self, packet: &[u8]) -> Result<(), Self::Error>

Implementors§