MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / validate

Method validate

atomic-core/src/operation/mod.rs:884–895  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

882
883impl EffectReceiptPayload {
884 fn validate(&self) -> Result<(), OperationCodecError> {
885 match (self.kind, self.effect_ordinal) {
886 (EffectReceiptKind::Verified, None) => Ok(()),
887 (EffectReceiptKind::Verified, Some(_)) => Err(OperationCodecError::new(
888 "operation-level verified receipts cannot name an effect ordinal",
889 )),
890 (_, None) => Err(OperationCodecError::new(
891 "non-verified receipts require an effect ordinal",
892 )),
893 (_, Some(_)) => Ok(()),
894 }
895 }
896}
897
898/// Content-addressed immutable external-effect receipt.

Callers 4

newMethod · 0.45
decode_effect_receiptFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected