Skip to main content

TcpParseContext

Trait TcpParseContext 

Source
pub trait TcpParseContext {
    // Required method
    fn verify_checksum_if_needed<E>(
        &mut self,
        f: impl FnOnce() -> Result<(), E>,
    ) -> Result<(), E>;
}
Expand description

Context for parsing TCP segments that may be subject to hardware checksum offloading.

Required Methods§

Source

fn verify_checksum_if_needed<E>( &mut self, f: impl FnOnce() -> Result<(), E>, ) -> Result<(), E>

f must verify the segment’s checksum and return the result. It will be called if checksum verification is needed.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl TcpParseContext for NoOpParsingContext

Source§

fn verify_checksum_if_needed<E>( &mut self, f: impl FnOnce() -> Result<(), E>, ) -> Result<(), E>

Implementors§