pub struct OperationalReceipt {
pub receipt_id: ReceiptId,
pub event_ids: Vec<EventId>,
pub severity: ReceiptSeverity,
pub title: LocalizedText,
pub body: LocalizedText,
pub status_code: String,
pub artifact_refs: Vec<ArtifactRef>,
}Expand description
A deterministic, server-rendered statement of what happened (spec §17.3).
Receipts are the only place where operational outcomes are stated. A receipt claiming success must reference at least one committed event.
Fields§
§receipt_id: ReceiptIdIdentifier of the receipt.
event_ids: Vec<EventId>Events that authorize the claim (I16).
severity: ReceiptSeveritySeverity.
title: LocalizedTextTitle copy.
body: LocalizedTextBody copy.
status_code: StringStable status code (e.g. "trip.extra_added", "airline.accepted").
artifact_refs: Vec<ArtifactRef>Artifacts produced.
Implementations§
Source§impl OperationalReceipt
impl OperationalReceipt
Sourcepub fn is_event_backed(&self) -> bool
pub fn is_event_backed(&self) -> bool
Returns true when the receipt is backed by at least one event.
Trait Implementations§
Source§impl Clone for OperationalReceipt
impl Clone for OperationalReceipt
Source§impl Debug for OperationalReceipt
impl Debug for OperationalReceipt
Source§impl<'de> Deserialize<'de> for OperationalReceipt
impl<'de> Deserialize<'de> for OperationalReceipt
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 OperationalReceipt
Source§impl PartialEq for OperationalReceipt
impl PartialEq for OperationalReceipt
Source§impl Serialize for OperationalReceipt
impl Serialize for OperationalReceipt
impl StructuralPartialEq for OperationalReceipt
Auto Trait Implementations§
impl Freeze for OperationalReceipt
impl RefUnwindSafe for OperationalReceipt
impl Send for OperationalReceipt
impl Sync for OperationalReceipt
impl Unpin for OperationalReceipt
impl UnsafeUnpin for OperationalReceipt
impl UnwindSafe for OperationalReceipt
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.