v0.1.0-pre.011
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
//! Materializer API contract used by business materializer crates.
|
||||
|
||||
/// Common contract implemented by all business materializer crates.
|
||||
pub trait Materializer {
|
||||
pub trait MtMaterializer {
|
||||
/// Returns the stable materializer name.
|
||||
fn materializer_name(&self) -> &'static str;
|
||||
|
||||
@@ -12,11 +12,11 @@ pub trait Materializer {
|
||||
fn materializer_version(&self) -> &'static str;
|
||||
|
||||
/// Tests whether this materializer accepts a decoded event.
|
||||
fn accepts_event(&self, event: &crate::DecodedProtocolEvent) -> bool;
|
||||
fn accepts_event(&self, event: &crate::MdDecodedProtocolEvent) -> bool;
|
||||
|
||||
/// Materializes a decoded event into zero or more business events.
|
||||
fn materialize_event(
|
||||
&self,
|
||||
event: &crate::DecodedProtocolEvent,
|
||||
) -> kb_core::Result<std::vec::Vec<crate::MaterializedEvent>>;
|
||||
event: &crate::MdDecodedProtocolEvent,
|
||||
) -> kb_core::Result<std::vec::Vec<crate::MdMaterializedEvent>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user