Skip to main content

Metadata

Trait Metadata 

Source
pub trait Metadata: Sized {
    type Error;

    // Required methods
    fn extract(store: &MetadataStore) -> Result<Self, Self::Error>;
    fn inject(&self, map: &mut MetadataStore) -> Result<(), Self::Error>;
}
Expand description

Implemented by types that can be stored as metadata. Provides a stable key and string-based serialization.

Required Associated Types§

Source

type Error

The error produced when extracting the Metadata

Required Methods§

Source

fn extract(store: &MetadataStore) -> Result<Self, Self::Error>

Extract Metadata from the store

Source

fn inject(&self, map: &mut MetadataStore) -> Result<(), Self::Error>

Inject Self into the store

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl Metadata for Queue

Source§

impl Metadata for TracingContext

Available on crate feature tracing only.