pub struct VerificationCase { /* private fields */ }Expand description
Stable identity linking a planned action to its hypothesis provenance.
Most cases authorize a conclusive outcome to transition hypothesis_id.
Knowledge-only cases retain that identity solely as the motivation/audit
anchor and explicitly suppress every hypothesis-state transition.
Implementations§
Source§impl VerificationCase
impl VerificationCase
Sourcepub fn new(
id: impl Into<String>,
subject: EntityId,
action_id: impl Into<String>,
hypothesis_id: impl Into<String>,
) -> Result<Self, VerificationError>
pub fn new( id: impl Into<String>, subject: EntityId, action_id: impl Into<String>, hypothesis_id: impl Into<String>, ) -> Result<Self, VerificationError>
Creates a validated verification case.
By default a conclusive outcome transitions Self::hypothesis_id. Use
Self::without_hypothesis_transition for a knowledge-only case whose
outcome is recorded without confirming or rejecting any hypothesis.
Sourcepub fn with_payload_strategy(self, strategy: Option<PayloadStrategyRef>) -> Self
pub fn with_payload_strategy(self, strategy: Option<PayloadStrategyRef>) -> Self
Attaches the exact planner-selected strategy revision to this case.
Sourcepub fn without_hypothesis_transition(self) -> Self
pub fn without_hypothesis_transition(self) -> Self
Marks this case knowledge-only: its outcome is still recorded (and can be
Success), but no hypothesis-state transition is applied. This separates
“the action’s objective was achieved” from “the motivating hypothesis was
conclusively verified”.
Sourcepub fn applies_hypothesis_transition(&self) -> bool
pub fn applies_hypothesis_transition(&self) -> bool
Returns whether a conclusive outcome transitions the case hypothesis.
Sourcepub fn hypothesis_id(&self) -> &str
pub fn hypothesis_id(&self) -> &str
Returns the transition target, or the motivation/audit anchor when this case does not authorize hypothesis transitions.
Sourcepub const fn payload_strategy(&self) -> Option<&PayloadStrategyRef>
pub const fn payload_strategy(&self) -> Option<&PayloadStrategyRef>
Returns the payload strategy selected for this case, when present.
Trait Implementations§
Source§impl Clone for VerificationCase
impl Clone for VerificationCase
Source§fn clone(&self) -> VerificationCase
fn clone(&self) -> VerificationCase
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerificationCase
impl Debug for VerificationCase
Source§impl<'de> Deserialize<'de> for VerificationCase
impl<'de> Deserialize<'de> for VerificationCase
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>,
impl Eq for VerificationCase
Source§impl PartialEq for VerificationCase
impl PartialEq for VerificationCase
Source§impl Serialize for VerificationCase
impl Serialize for VerificationCase
impl StructuralPartialEq for VerificationCase
Auto Trait Implementations§
impl Freeze for VerificationCase
impl RefUnwindSafe for VerificationCase
impl Send for VerificationCase
impl Sync for VerificationCase
impl Unpin for VerificationCase
impl UnsafeUnpin for VerificationCase
impl UnwindSafe for VerificationCase
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
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
§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
key and return true if they are equal.