Skip to main content

EventDescriptor

Trait EventDescriptor 

Source
pub trait EventDescriptor {
    type Event: Serialize + DeserializeOwned;

    const KEY: &'static str;
    const SUBJECT: &'static str;
}
Expand description

Metadata required to publish one typed Trellis event.

Required Associated Constants§

Source

const KEY: &'static str

Logical contract key for the event.

Source

const SUBJECT: &'static str

Concrete NATS subject for the event.

Required Associated Types§

Source

type Event: Serialize + DeserializeOwned

Event payload type.

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§