pub struct ResultData {
pub phase: Option<Phase>,
pub effect: Effect,
pub predicted_effect: Option<PredictedEffect>,
pub counts: Counts,
pub removed_comments: Vec<RemovedComment>,
pub kept_comments: Vec<KeptComment>,
pub verification: Verification,
pub generation: Option<Value>,
pub expectations: Option<ExpectationReport>,
}Expand description
Result data for success or failure: phase (null before any completed stage), effect, optional predicted effect, counts and verification.
Fields§
§phase: Option<Phase>Last completed stage; null when no stage completed. Success requires it.
effect: EffectThe primary document effect.
predicted_effect: Option<PredictedEffect>Predicted effect for dry runs; only valid with Phase::Validated.
counts: CountsCounts of operations, revisions and comments.
removed_comments: Vec<RemovedComment>Threads removed by revision settlement, in the source’s ids.
kept_comments: Vec<KeptComment>Threads rescued on empty anchors by an edit plan.
verification: VerificationVerification block.
generation: Option<Value>Generator-only coverage and bounded working readiness; never plan authority.
expectations: Option<ExpectationReport>The bounded expectation report when --expect was evaluated: the
receipt (path, digest, schema version, checks run/refused/
unsupported, targets, text view, declared provenance) plus the
per-check outcomes. Absent when no expectations were supplied.
Implementations§
Source§impl ResultData
impl ResultData
Sourcepub fn failure(phase: Option<Phase>) -> ResultData
pub fn failure(phase: Option<Phase>) -> ResultData
Build pre-commit failure data with the last completed phase.
Sourcepub fn new(phase: Phase, effect: Effect) -> ResultData
pub fn new(phase: Phase, effect: Effect) -> ResultData
Build a result data block. Pre-commit phases require not_applied;
the predicted_effect is set with
ResultData::set_predicted and only allowed for validated.
Envelope::ok enforces both rules through
ResultData::validate.
Sourcepub fn set_predicted(&mut self, predicted: PredictedEffect)
pub fn set_predicted(&mut self, predicted: PredictedEffect)
Set the predicted effect (dry runs only). Mutates in place so the builder can be called several times before validation.
Sourcepub fn validate(&self) -> Result<(), ResultDataError>
pub fn validate(&self) -> Result<(), ResultDataError>
Validate the (phase, effect, predicted_effect) combination. Returns
Ok(()) for a legal combination, Err(ResultDataError) otherwise.
Trait Implementations§
Source§impl Clone for ResultData
impl Clone for ResultData
Source§fn clone(&self) -> ResultData
fn clone(&self) -> ResultData
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 ResultData
impl Debug for ResultData
Source§impl<'de> Deserialize<'de> for ResultData
impl<'de> Deserialize<'de> for ResultData
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResultData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResultData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ResultData
Source§impl PartialEq for ResultData
impl PartialEq for ResultData
Source§impl Serialize for ResultData
impl Serialize for ResultData
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ResultData
Auto Trait Implementations§
impl Forget for ResultData
impl Freeze for ResultData
impl Move for ResultData
impl RefUnwindSafe for ResultData
impl Send for ResultData
impl Sync for ResultData
impl Unpin for ResultData
impl UnsafeUnpin for ResultData
impl UnwindSafe for ResultData
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.