Skip to main content

UdpSerializationContext

Trait UdpSerializationContext 

Source
pub trait UdpSerializationContext: SerializationContext {
    // Required methods
    fn envelope_to_state(envelope: UdpEnvelope) -> Self::ContextState;
    fn checksum_action(&mut self) -> TransportChecksumAction;
}
Expand description

A trait for UDP serialization contexts.

Required Methods§

Source

fn envelope_to_state(envelope: UdpEnvelope) -> Self::ContextState

Converts a UdpEnvelope into the serialization context’s state.

Source

fn checksum_action(&mut self) -> TransportChecksumAction

Returns the checksum action to take based on the serialization context.

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.

Implementations on Foreign Types§

Source§

impl UdpSerializationContext for NoOpSerializationContext

Implementors§