pub struct MutationAnalyzer { /* private fields */ }Expand description
Mutation analyzer
Implementations§
Source§impl MutationAnalyzer
impl MutationAnalyzer
Sourcepub fn with_rules(self, rules: BehaviorRules) -> Self
pub fn with_rules(self, rules: BehaviorRules) -> Self
Create with behavior rules
Sourcepub async fn analyze_mutation(
&self,
current: &Value,
previous: Option<&Value>,
_context: &StatefulAiContext,
) -> Result<MutationAnalysis>
pub async fn analyze_mutation( &self, current: &Value, previous: Option<&Value>, _context: &StatefulAiContext, ) -> Result<MutationAnalysis>
Analyze mutation between current and previous request
Compares the current request with the previous request in the session to detect changes and identify potential validation issues.
Sourcepub async fn detect_validation_issues(
&self,
mutation: &MutationAnalysis,
) -> Result<Vec<ValidationIssue>>
pub async fn detect_validation_issues( &self, mutation: &MutationAnalysis, ) -> Result<Vec<ValidationIssue>>
Detect validation issues based on mutation and rules
Sourcepub fn infer_response_type(
&self,
mutation: &MutationAnalysis,
_context: &StatefulAiContext,
) -> ResponseType
pub fn infer_response_type( &self, mutation: &MutationAnalysis, _context: &StatefulAiContext, ) -> ResponseType
Infer response type from mutation analysis
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MutationAnalyzer
impl RefUnwindSafe for MutationAnalyzer
impl Send for MutationAnalyzer
impl Sync for MutationAnalyzer
impl Unpin for MutationAnalyzer
impl UnsafeUnpin for MutationAnalyzer
impl UnwindSafe for MutationAnalyzer
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