pub struct AgentEffectBuilder { /* private fields */ }Expand description
Construction helper for incrementally assembling an AgentEffect.
This keeps mutation in the authoring phase while preserving AgentEffect
as the finished proposal output value returned by a suggestor.
Implementations§
Source§impl AgentEffectBuilder
impl AgentEffectBuilder
Sourcepub fn proposal(self, proposal: ProposedFact) -> Self
pub fn proposal(self, proposal: ProposedFact) -> Self
Adds one proposal and returns the builder for fluent construction.
Sourcepub fn proposals(
self,
proposals: impl IntoIterator<Item = ProposedFact>,
) -> Self
pub fn proposals( self, proposals: impl IntoIterator<Item = ProposedFact>, ) -> Self
Adds many proposals and returns the builder for fluent construction.
Sourcepub fn push(&mut self, proposal: ProposedFact)
pub fn push(&mut self, proposal: ProposedFact)
Appends one proposal to an existing mutable builder.
Sourcepub fn extend(&mut self, proposals: impl IntoIterator<Item = ProposedFact>)
pub fn extend(&mut self, proposals: impl IntoIterator<Item = ProposedFact>)
Appends many proposals to an existing mutable builder.
Sourcepub fn build(self) -> AgentEffect
pub fn build(self) -> AgentEffect
Finalizes the builder into a suggestor effect.
Trait Implementations§
Source§impl Debug for AgentEffectBuilder
impl Debug for AgentEffectBuilder
Source§impl Default for AgentEffectBuilder
impl Default for AgentEffectBuilder
Source§fn default() -> AgentEffectBuilder
fn default() -> AgentEffectBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AgentEffectBuilder
impl !RefUnwindSafe for AgentEffectBuilder
impl Send for AgentEffectBuilder
impl Sync for AgentEffectBuilder
impl Unpin for AgentEffectBuilder
impl UnsafeUnpin for AgentEffectBuilder
impl !UnwindSafe for AgentEffectBuilder
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