Skip to main content

Codec

Trait Codec 

Source
pub trait Codec:
    Sealed
    + Send
    + Sync {
    // Required method
    fn settings(&self) -> CodecSettings;
}
Expand description

The single sealed consumer boundary for a complete codec specification.

The trait is object-safe for integration boundaries, while ordinary hot paths remain generic over one whole specification type. It intentionally has no associated constants so runtime specifications and trait objects use the same contract.

Required Methods§

Source

fn settings(&self) -> CodecSettings

Returns the complete validated settings value.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§