pub struct ReceiptDocumentV1 {
pub schema_version: u32,
pub receipt_id: Sha256Digest,
pub lineage: ReceiptLineageV1,
pub chain: ReceiptChainLinkV1,
pub status: ReceiptTerminalStatusV1,
pub values: Vec<ReceiptValueV1>,
pub outcome: ReceiptOutcomeLinkV1,
pub evidence_refs: Vec<ReceiptEvidenceRefV1>,
pub issued_at: UtcTimestamp,
pub signer: ReceiptSignerV1,
pub signature: String,
}Expand description
Canonical signed receipt document.
Fields§
§schema_version: u32§receipt_id: Sha256Digest§lineage: ReceiptLineageV1§chain: ReceiptChainLinkV1§status: ReceiptTerminalStatusV1§values: Vec<ReceiptValueV1>§outcome: ReceiptOutcomeLinkV1§evidence_refs: Vec<ReceiptEvidenceRefV1>§issued_at: UtcTimestamp§signer: ReceiptSignerV1§signature: StringImplementations§
Source§impl ReceiptDocumentV1
impl ReceiptDocumentV1
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, ValidationError>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, ValidationError>
Canonical bytes for the complete document, including signature.
Sourcepub fn canonical_json(&self) -> Result<String, ValidationError>
pub fn canonical_json(&self) -> Result<String, ValidationError>
Return canonical JSON as UTF-8 text without changing its bytes.
Sourcepub fn identity_bytes(&self) -> Result<Vec<u8>, ValidationError>
pub fn identity_bytes(&self) -> Result<Vec<u8>, ValidationError>
Canonical bytes used to derive the receipt ID.
Sourcepub fn signing_bytes(&self) -> Result<Vec<u8>, ValidationError>
pub fn signing_bytes(&self) -> Result<Vec<u8>, ValidationError>
Canonical bytes covered by the Ed25519 signature.
Sourcepub fn signature_bytes(&self) -> Result<Vec<u8>, ValidationError>
pub fn signature_bytes(&self) -> Result<Vec<u8>, ValidationError>
Alias used by verifiers when requesting signature coverage bytes.
Sourcepub fn derived_receipt_id(&self) -> Result<Sha256Digest, ValidationError>
pub fn derived_receipt_id(&self) -> Result<Sha256Digest, ValidationError>
Derive the canonical SHA-256 receipt identity.
Sourcepub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self, ValidationError>
pub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self, ValidationError>
Decode exactly canonical UTF-8 JSON and validate all protocol joins.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, ValidationError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, ValidationError>
Compatibility alias for callers that name the wire input from_bytes.
Sourcepub fn from_canonical_json(bytes: &[u8]) -> Result<Self, ValidationError>
pub fn from_canonical_json(bytes: &[u8]) -> Result<Self, ValidationError>
Compatibility alias for callers that name the wire input JSON.
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate the full signed lineage and its content identity.
Trait Implementations§
Source§impl Clone for ReceiptDocumentV1
impl Clone for ReceiptDocumentV1
Source§fn clone(&self) -> ReceiptDocumentV1
fn clone(&self) -> ReceiptDocumentV1
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReceiptDocumentV1
impl Debug for ReceiptDocumentV1
Source§impl<'de> Deserialize<'de> for ReceiptDocumentV1
impl<'de> Deserialize<'de> for ReceiptDocumentV1
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 ReceiptDocumentV1
Source§impl PartialEq for ReceiptDocumentV1
impl PartialEq for ReceiptDocumentV1
Source§impl Serialize for ReceiptDocumentV1
impl Serialize for ReceiptDocumentV1
impl StructuralPartialEq for ReceiptDocumentV1
Auto Trait Implementations§
impl Freeze for ReceiptDocumentV1
impl RefUnwindSafe for ReceiptDocumentV1
impl Send for ReceiptDocumentV1
impl Sync for ReceiptDocumentV1
impl Unpin for ReceiptDocumentV1
impl UnsafeUnpin for ReceiptDocumentV1
impl UnwindSafe for ReceiptDocumentV1
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