pub struct SchemaEvolutionManager { /* private fields */ }Expand description
Schema evolution manager — tracks inferred schemas and evolution history
Implementations§
Source§impl SchemaEvolutionManager
impl SchemaEvolutionManager
pub fn new() -> Self
Sourcepub fn analyze_event(
&self,
event_type: &str,
payload: &JsonValue,
) -> Option<EvolutionAction>
pub fn analyze_event( &self, event_type: &str, payload: &JsonValue, ) -> Option<EvolutionAction>
Analyze an event and evolve the schema if needed
Returns the evolution action taken (if any)
Sourcepub fn get_schema(&self, event_type: &str) -> Option<InferredSchema>
pub fn get_schema(&self, event_type: &str) -> Option<InferredSchema>
Get the current inferred schema for an event type
Sourcepub fn get_history(&self, event_type: &str) -> Vec<EvolutionRecord>
pub fn get_history(&self, event_type: &str) -> Vec<EvolutionRecord>
Get the evolution history for an event type
Sourcepub fn list_event_types(&self) -> Vec<String>
pub fn list_event_types(&self) -> Vec<String>
Get all tracked event types
Sourcepub fn get_version(&self, event_type: &str) -> Option<u32>
pub fn get_version(&self, event_type: &str) -> Option<u32>
Get the current version for an event type
Sourcepub fn stats(&self) -> SchemaEvolutionStats
pub fn stats(&self) -> SchemaEvolutionStats
Statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaEvolutionManager
impl !RefUnwindSafe for SchemaEvolutionManager
impl Send for SchemaEvolutionManager
impl Sync for SchemaEvolutionManager
impl Unpin for SchemaEvolutionManager
impl UnsafeUnpin for SchemaEvolutionManager
impl UnwindSafe for SchemaEvolutionManager
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