pub struct ConsistencyRequirementRecord { /* private fields */ }Expand description
Immutable v1 original-plan-bound requested guarantee, separate from fresh observations.
Implementations§
Source§impl ConsistencyRequirementRecord
impl ConsistencyRequirementRecord
Sourcepub fn new(
plan: &OperationPlanRecord,
guarantee: ConsistencyGuaranteeRecord,
) -> Self
pub fn new( plan: &OperationPlanRecord, guarantee: ConsistencyGuaranteeRecord, ) -> Self
Declare a guarantee for the full original plan; does not establish consistency.
Sourcepub fn plan_intent(&self) -> &str
pub fn plan_intent(&self) -> &str
Read canonical original full plan intent, including selection and original budgets.
Sourcepub const fn guarantee(&self) -> ConsistencyGuaranteeRecord
pub const fn guarantee(&self) -> ConsistencyGuaranteeRecord
Read the immutable requested guarantee.
Sourcepub fn validate_plan(
&self,
plan: &OperationPlanRecord,
) -> Result<(), ConsistencyRequirementError>
pub fn validate_plan( &self, plan: &OperationPlanRecord, ) -> Result<(), ConsistencyRequirementError>
Match the exact original plan; declarations never upgrade a guarantee on recovery.
§Errors
Rejects a different full plan intent.
Sourcepub fn digest(&self) -> ArtifactChecksumRecord
pub fn digest(&self) -> ArtifactChecksumRecord
Hash NUL-terminated v1 ASCII domain, 64 ASCII original-intent bytes and guarantee tag.
Tags are per_canister=0 and application_coordinated=1. No current evidence,
timestamps or editable derived hashes are included or retained in this record.
Trait Implementations§
Source§impl Clone for ConsistencyRequirementRecord
impl Clone for ConsistencyRequirementRecord
Source§impl Debug for ConsistencyRequirementRecord
impl Debug for ConsistencyRequirementRecord
Source§impl<'de> Deserialize<'de> for ConsistencyRequirementRecord
impl<'de> Deserialize<'de> for ConsistencyRequirementRecord
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 ConsistencyRequirementRecord
impl StructuralPartialEq for ConsistencyRequirementRecord
Auto Trait Implementations§
impl Freeze for ConsistencyRequirementRecord
impl RefUnwindSafe for ConsistencyRequirementRecord
impl Send for ConsistencyRequirementRecord
impl Sync for ConsistencyRequirementRecord
impl Unpin for ConsistencyRequirementRecord
impl UnsafeUnpin for ConsistencyRequirementRecord
impl UnwindSafe for ConsistencyRequirementRecord
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