pub trait Codec: Sealed {
const ID: CodecId;
}Expand description
Associates a built-in codec type with its on-binary CodecId.
This trait is sealed and cannot be implemented outside this crate. The
codec id is a fixed four-bit field of the embedded entry header with no
values left over, so there is no id a downstream codec could claim and no
path by which the derive macros or crate::decompress could reach one.
Compression itself lives on inherent methods of each codec type, so
calling Deflate.compress(..) does not require this trait in scope.
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".