Skip to main content

TxMetadata

Trait TxMetadata 

Source
pub trait TxMetadata:
    Default
    + Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn socket_info(&self) -> Option<SocketInfo>;
    fn checksum_offload_result(&self) -> Option<ChecksumOffloadResult>;
    fn set_checksum_offload_result(
        &mut self,
        result: Option<ChecksumOffloadResult>,
    );
}
Expand description

A trait for the metadata associated with a TX frame.

The Default impl yields the default, i.e. unspecified, metadata instance.

Required Methods§

Source

fn socket_info(&self) -> Option<SocketInfo>

Returns SocketInfo for the socket associated with the packet. None is returned if the packet is not associated with a local socket.

Source

fn checksum_offload_result(&self) -> Option<ChecksumOffloadResult>

Returns the result of TX checksum offloading, if any was performed.

Source

fn set_checksum_offload_result(&mut self, result: Option<ChecksumOffloadResult>)

Sets the TX checksum offload result. Replaces the previous result if called multiple times.

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.

Implementors§