pub struct ProjectionManager { /* private fields */ }Expand description
Projection manager handles multiple projections
Implementations§
Source§impl ProjectionManager
impl ProjectionManager
pub fn new() -> Self
pub fn with_metrics(metrics: Arc<MetricsRegistry>) -> Self
Sourcepub fn register(&mut self, projection: Arc<dyn Projection>)
pub fn register(&mut self, projection: Arc<dyn Projection>)
Register a new projection
Sourcepub fn process_event(&self, event: &Event) -> Result<()>
pub fn process_event(&self, event: &Event) -> Result<()>
Process an event through all projections
Sourcepub fn get_projection(&self, name: &str) -> Option<Arc<dyn Projection>>
pub fn get_projection(&self, name: &str) -> Option<Arc<dyn Projection>>
Get a projection by name
Sourcepub fn list_projections(&self) -> Vec<(String, Arc<dyn Projection>)>
pub fn list_projections(&self) -> Vec<(String, Arc<dyn Projection>)>
List all projections
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProjectionManager
impl !RefUnwindSafe for ProjectionManager
impl Send for ProjectionManager
impl Sync for ProjectionManager
impl Unpin for ProjectionManager
impl !UnwindSafe for ProjectionManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more