pub struct AttackAction { /* private fields */ }Expand description
Declarative executable candidate considered by the planner.
Implementations§
Source§impl AttackAction
impl AttackAction
Sourcepub fn new(
id: impl Into<String>,
executor: impl Into<String>,
requirements: Expression,
confidence_source: HypothesisSelector,
gain: BenefitScore,
cost: ActionCost,
risk: RiskScore,
prerequisites: BTreeSet<String>,
) -> Result<Self, PlannerError>
pub fn new( id: impl Into<String>, executor: impl Into<String>, requirements: Expression, confidence_source: HypothesisSelector, gain: BenefitScore, cost: ActionCost, risk: RiskScore, prerequisites: BTreeSet<String>, ) -> Result<Self, PlannerError>
Creates a validated action without executing or resolving dependencies.
Sourcepub fn with_verification_target(self, target: VerificationTarget) -> Self
pub fn with_verification_target(self, target: VerificationTarget) -> Self
Sets what a conclusive outcome may transition. Defaults to
VerificationTarget::Motivation (confirm the confidence hypothesis).
Sourcepub fn verification_target(&self) -> &VerificationTarget
pub fn verification_target(&self) -> &VerificationTarget
Returns what a conclusive outcome may transition.
Sourcepub fn with_payload_strategy(self, strategy: PayloadStrategyRef) -> Self
pub fn with_payload_strategy(self, strategy: PayloadStrategyRef) -> Self
Selects a versioned payload strategy without exposing its implementation.
Sourcepub const fn payload_strategy(&self) -> Option<&PayloadStrategyRef>
pub const fn payload_strategy(&self) -> Option<&PayloadStrategyRef>
Returns the planner-selected payload strategy, when this action uses one.
Sourcepub fn requirements(&self) -> &Expression
pub fn requirements(&self) -> &Expression
Returns the rule expression gating this action.
Sourcepub fn confidence_source(&self) -> &HypothesisSelector
pub fn confidence_source(&self) -> &HypothesisSelector
Returns the hypothesis selector supplying Bayesian confidence.
Sourcepub fn gain(&self) -> BenefitScore
pub fn gain(&self) -> BenefitScore
Returns expected gain.
Sourcepub fn cost(&self) -> ActionCost
pub fn cost(&self) -> ActionCost
Returns estimated execution cost.
Sourcepub fn prerequisites(&self) -> &BTreeSet<String>
pub fn prerequisites(&self) -> &BTreeSet<String>
Returns prerequisite action identities in stable order.
Trait Implementations§
Source§impl Clone for AttackAction
impl Clone for AttackAction
Source§fn clone(&self) -> AttackAction
fn clone(&self) -> AttackAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttackAction
impl Debug for AttackAction
Source§impl<'de> Deserialize<'de> for AttackAction
impl<'de> Deserialize<'de> for AttackAction
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AttackAction
Source§impl PartialEq for AttackAction
impl PartialEq for AttackAction
Source§impl Serialize for AttackAction
impl Serialize for AttackAction
impl StructuralPartialEq for AttackAction
Auto Trait Implementations§
impl Freeze for AttackAction
impl RefUnwindSafe for AttackAction
impl Send for AttackAction
impl Sync for AttackAction
impl Unpin for AttackAction
impl UnsafeUnpin for AttackAction
impl UnwindSafe for AttackAction
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more