pub struct ValidationAgent { /* private fields */ }Expand description
Compatibility validator for staged proposals.
Implementations§
Source§impl ValidationAgent
impl ValidationAgent
Sourcepub fn new(config: ValidationConfig) -> Self
pub fn new(config: ValidationConfig) -> Self
Creates a new validation agent with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Creates a validation agent with default config.
Sourcepub fn validate_proposal(&self, proposal: &ProposedFact) -> ValidationResult
pub fn validate_proposal(&self, proposal: &ProposedFact) -> ValidationResult
Validates a single proposal against the config.
Trait Implementations§
Source§impl Suggestor for ValidationAgent
impl Suggestor for ValidationAgent
Source§fn name(&self) -> &str
fn name(&self) -> &str
Human-readable name, used for ordering, logging, and provenance. Read more
Source§fn dependencies(&self) -> &[ContextKey]
fn dependencies(&self) -> &[ContextKey]
Context keys this suggestor reads from. Read more
Source§fn accepts(&self, ctx: &dyn ContextView) -> bool
fn accepts(&self, ctx: &dyn ContextView) -> bool
Pure predicate: should this suggestor execute given the current context? Read more
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 dyn ContextView,
) -> Pin<Box<dyn Future<Output = AgentEffect> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 dyn ContextView,
) -> Pin<Box<dyn Future<Output = AgentEffect> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Produce effects given the current context. Read more
Auto Trait Implementations§
impl Freeze for ValidationAgent
impl RefUnwindSafe for ValidationAgent
impl Send for ValidationAgent
impl Sync for ValidationAgent
impl Unpin for ValidationAgent
impl UnsafeUnpin for ValidationAgent
impl UnwindSafe for ValidationAgent
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