pub struct ModelStreamValidator { /* private fields */ }Expand description
Deterministic validator for normalized provider stream grammar.
Implementations§
Source§impl ModelStreamValidator
impl ModelStreamValidator
Sourcepub fn observe(
&mut self,
event: &ModelEvent,
) -> Result<(), ModelStreamViolation>
pub fn observe( &mut self, event: &ModelEvent, ) -> Result<(), ModelStreamViolation>
Observes one event in source order.
§Errors
Returns a typed violation when the event does not follow normalized stream grammar. Rejected events do not advance validator state.
Sourcepub fn finish(self) -> Result<ModelStreamSummary, ModelStreamViolation>
pub fn finish(self) -> Result<ModelStreamSummary, ModelStreamViolation>
Finishes validation after the stream returns None.
§Errors
Returns an error when start or terminal events are missing.
Trait Implementations§
Source§impl Debug for ModelStreamValidator
impl Debug for ModelStreamValidator
Source§impl Default for ModelStreamValidator
impl Default for ModelStreamValidator
Source§fn default() -> ModelStreamValidator
fn default() -> ModelStreamValidator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModelStreamValidator
impl RefUnwindSafe for ModelStreamValidator
impl Send for ModelStreamValidator
impl Sync for ModelStreamValidator
impl Unpin for ModelStreamValidator
impl UnsafeUnpin for ModelStreamValidator
impl UnwindSafe for ModelStreamValidator
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