Skip to main content

UdpParseContext

Trait UdpParseContext 

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

Context for parsing UDP packets 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 packet’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 UdpParseContext for NoOpParsingContext

Source§

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

Implementors§