pub trait ConstContentFormat: Sealed {
// Required method
fn content_format() -> ContentFormat;
}
Expand description
This trait is used to instantiate different typed byte vectors with a specific content format,
using SerializedBytes<C>
. This allows for compile-time guarantees about the content format
of the serialized bytes. The exception here is the escape hatch using e.g. from(Vec<u8>)
,
which can still be mis-used, but has to be misused explicitly.
Required Methods§
Sourcefn content_format() -> ContentFormat
fn content_format() -> ContentFormat
Returns the content format as a ContentFormat
enum.
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.