pub struct DelegationInvalidation {
pub schema_version: String,
pub protocol_version: String,
pub delegation_hash: String,
pub reason: DelegationInvalidationReason,
pub observed_workspace_generation: Option<String>,
pub observed_changes_hash: Option<String>,
}Expand description
Versioned receipt proving why an active delegation was invalidated.
Fields§
§schema_version: StringPublic schema identifier.
protocol_version: StringDelegation protocol version.
delegation_hash: StringDigest of the exact delegation plan.
reason: DelegationInvalidationReasonStable runtime-owned invalidation reason.
observed_workspace_generation: Option<String>Workspace generation observed when the conflict was detected.
observed_changes_hash: Option<String>Canonical digest of recomputed changes when change-set divergence was detected.
Implementations§
Source§impl DelegationInvalidation
impl DelegationInvalidation
Sourcepub fn new(
plan: &DelegationPlan,
parent: &TaskContract,
reason: DelegationInvalidationReason,
observed_workspace_generation: Option<String>,
observed_changes_hash: Option<String>,
) -> Result<Self, AgentError>
pub fn new( plan: &DelegationPlan, parent: &TaskContract, reason: DelegationInvalidationReason, observed_workspace_generation: Option<String>, observed_changes_hash: Option<String>, ) -> Result<Self, AgentError>
Constructs and validates one plan-bound invalidation receipt.
Sourcepub fn validate(
&self,
plan: &DelegationPlan,
parent: &TaskContract,
) -> Result<(), AgentError>
pub fn validate( &self, plan: &DelegationPlan, parent: &TaskContract, ) -> Result<(), AgentError>
Validates schema, plan binding, and reason-specific observations.
Sourcepub fn digest(
&self,
plan: &DelegationPlan,
parent: &TaskContract,
) -> Result<String, AgentError>
pub fn digest( &self, plan: &DelegationPlan, parent: &TaskContract, ) -> Result<String, AgentError>
Computes the canonical invalidation-receipt digest after validation.
Trait Implementations§
Source§impl Clone for DelegationInvalidation
impl Clone for DelegationInvalidation
Source§fn clone(&self) -> DelegationInvalidation
fn clone(&self) -> DelegationInvalidation
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 DelegationInvalidation
impl Debug for DelegationInvalidation
Source§impl<'de> Deserialize<'de> for DelegationInvalidation
impl<'de> Deserialize<'de> for DelegationInvalidation
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 DelegationInvalidation
Source§impl PartialEq for DelegationInvalidation
impl PartialEq for DelegationInvalidation
Source§impl Serialize for DelegationInvalidation
impl Serialize for DelegationInvalidation
impl StructuralPartialEq for DelegationInvalidation
Auto Trait Implementations§
impl Freeze for DelegationInvalidation
impl RefUnwindSafe for DelegationInvalidation
impl Send for DelegationInvalidation
impl Sync for DelegationInvalidation
impl Unpin for DelegationInvalidation
impl UnsafeUnpin for DelegationInvalidation
impl UnwindSafe for DelegationInvalidation
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