pub struct AgentEffect {
pub proposals: Vec<ProposedFact>,
}Expand description
The output of a suggestor’s execute() call.
An effect describes what a suggestor wants to suggest to the context. The engine collects effects from all eligible suggestors, validates them, and promotes them serially in deterministic order.
Fields§
§proposals: Vec<ProposedFact>New proposals to be validated by the engine.
Implementations§
Source§impl AgentEffect
impl AgentEffect
Sourcepub fn with_proposal(proposal: ProposedFact) -> Self
pub fn with_proposal(proposal: ProposedFact) -> Self
Creates an effect with a single proposal.
Sourcepub fn with_proposals(proposals: Vec<ProposedFact>) -> Self
pub fn with_proposals(proposals: Vec<ProposedFact>) -> Self
Creates an effect with multiple proposals.
Sourcepub fn affected_keys(&self) -> Vec<ContextKey>
pub fn affected_keys(&self) -> Vec<ContextKey>
Returns the context keys affected by this effect.
Trait Implementations§
Source§impl Debug for AgentEffect
impl Debug for AgentEffect
Source§impl Default for AgentEffect
impl Default for AgentEffect
Source§fn default() -> AgentEffect
fn default() -> AgentEffect
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AgentEffect
impl RefUnwindSafe for AgentEffect
impl Send for AgentEffect
impl Sync for AgentEffect
impl Unpin for AgentEffect
impl UnsafeUnpin for AgentEffect
impl UnwindSafe for AgentEffect
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