(&self)
| 882 | |
| 883 | impl 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. |
no outgoing calls
no test coverage detected