Skip to main content

HasSchema

Trait HasSchema 

Source
pub trait HasSchema {
    type A: 'static;
    type I: 'static;
    type E: EffectData + 'static;

    // Required method
    fn schema() -> Schema<Self::A, Self::I, Self::E>
       where Self: Sized;
}
Expand description

A type that knows its bidirectional Schema.

Required Associated Types§

Source

type A: 'static

Semantic (decoded) type.

Source

type I: 'static

Wire / encoded type.

Source

type E: EffectData + 'static

EffectData tag for the schema.

Required Methods§

Source

fn schema() -> Schema<Self::A, Self::I, Self::E>
where Self: Sized,

Canonical schema instance (typically a 'static singleton or cheap Clone).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§