Skip to main content

View

Trait View 

Source
pub trait View<A: Aggregate>:
    Debug
    + Clone
    + Default
    + Serialize
    + DeserializeOwned
    + MaybeSend
    + MaybeSync {
    const TYPE: &'static str;
    const IS_CHILD_OF_AGGREGATE: bool;

    // Required methods
    fn view_id(event: &EventEnvelope<A>) -> String;
    fn update(&self, event: &EventEnvelope<A>) -> Option<Self>;
}

Required Associated Constants§

Required Methods§

Source

fn view_id(event: &EventEnvelope<A>) -> String

Source

fn update(&self, event: &EventEnvelope<A>) -> Option<Self>

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§