Skip to main content

TcpSerializationContext

Trait TcpSerializationContext 

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

A trait for TCP serialization contexts.

Required Methods§

Source

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

Converts a TcpEnvelope 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 TcpSerializationContext for NoOpSerializationContext

Implementors§