Trait Key

Source
pub trait Key {
    type Item;
    type Metadata;

    const NAME: &'static str;
    const TYPE_ID: usize;

    // Required methods
    fn build(&self) -> Self;
    fn field(&mut self, f: Self::Item) -> &mut Self;
    fn flatten(&self) -> Bytes;
    fn get_metadata(&self) -> Self::Metadata;
    fn metadata(&mut self, meta: KeyMetadata) -> &mut Self;
    fn builder() -> Self;
    fn type_id(&self) -> usize;
    fn name(&self) -> &'static str;
}

Required Associated Constants§

Source

const NAME: &'static str

Source

const TYPE_ID: usize

Required Associated Types§

Required Methods§

Source

fn build(&self) -> Self

Source

fn field(&mut self, f: Self::Item) -> &mut Self

Source

fn flatten(&self) -> Bytes

Source

fn get_metadata(&self) -> Self::Metadata

Source

fn metadata(&mut self, meta: KeyMetadata) -> &mut Self

Source

fn builder() -> Self

Source

fn type_id(&self) -> usize

Source

fn name(&self) -> &'static str

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§