pub trait Encoder {
// Required method
fn encode_cmsg<T: Copy>(
&mut self,
level: c_int,
ty: c_int,
value: T,
) -> Result<usize, Error>;
// Provided methods
fn encode_ecn(
&mut self,
ecn: ExplicitCongestionNotification,
remote_address: &SocketAddress,
) -> Result<usize, Error> { ... }
fn encode_gso(&mut self, segment_size: u16) -> Result<usize, Error> { ... }
fn encode_local_address(
&mut self,
address: &SocketAddress,
) -> Result<usize, Error> { ... }
}Required Methods§
Provided Methods§
Sourcefn encode_ecn(
&mut self,
ecn: ExplicitCongestionNotification,
remote_address: &SocketAddress,
) -> Result<usize, Error>
fn encode_ecn( &mut self, ecn: ExplicitCongestionNotification, remote_address: &SocketAddress, ) -> Result<usize, Error>
Encodes ECN markings into the cmsg encoder
Sourcefn encode_gso(&mut self, segment_size: u16) -> Result<usize, Error>
fn encode_gso(&mut self, segment_size: u16) -> Result<usize, Error>
Encodes GSO segment_size into the cmsg encoder
fn encode_local_address( &mut self, address: &SocketAddress, ) -> Result<usize, Error>
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.