Trait DataFormat

Source
pub trait DataFormat {
    // Required methods
    fn id() -> u64;
    fn media_type() -> &'static str;
}
Expand description

A data format that can be use by a kekbit channel

Required Methods§

Source

fn id() -> u64

Returns the unique identifer of this data format. As a convention 'standard data formats must have an id below 2^32, while application specific formats should have an id equal or greater with 2^32

Source

fn media_type() -> &'static str

Returns the media type associated with this codec. This value is just informative. E.g for a Json encoder should return “application/json

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.

Implementors§