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

Method read_receipt_kind

atomic-core/src/operation/codec.rs:1475–1486  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1473 }
1474
1475 fn read_receipt_kind(&mut self) -> Result<EffectReceiptKind, OperationCodecError> {
1476 match self.read_u8()? {
1477 0 => Ok(EffectReceiptKind::Applied),
1478 1 => Ok(EffectReceiptKind::Verified),
1479 2 => Ok(EffectReceiptKind::RolledBack),
1480 3 => Ok(EffectReceiptKind::LeaseRejected),
1481 4 => Ok(EffectReceiptKind::Recovered),
1482 tag => Err(OperationCodecError::new(format!(
1483 "unsupported effect receipt kind tag {tag}"
1484 ))),
1485 }
1486 }
1487
1488 fn finish(self) -> Result<(), OperationCodecError> {
1489 if self.offset != self.bytes.len() {

Callers 1

decode_effect_receiptFunction · 0.80

Calls 1

read_u8Method · 0.80

Tested by

no test coverage detected