Skip to main content

NamespaceScoped

Trait NamespaceScoped 

Source
pub trait NamespaceScoped: Projection {
    // Required method
    fn new_for(namespace: &str) -> Self;
}
Expand description

Projections that need to know their namespace before any events are applied (DESIGN.md §2) — e.g. SessionProjection filters to one namespace, so it can’t be built via plain Default the way KvProjection can.

Required Methods§

Source

fn new_for(namespace: &str) -> Self

Constructs the projection already scoped to namespace.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§