pub struct Receipt {
pub id: ReceiptId,
pub action: ActionRecord,
pub signature: String,
pub chain_position: u64,
pub previous_hash: String,
pub hash: String,
pub created_at: DateTime<Utc>,
}Expand description
A receipt (signed action record).
Fields§
§id: ReceiptIdReceipt ID.
action: ActionRecordThe action that was recorded.
signature: StringSignature (from Identity).
chain_position: u64Position in the hash chain.
previous_hash: StringHash of previous receipt (for chain integrity).
hash: StringThis receipt’s hash.
created_at: DateTime<Utc>When the receipt was created.
Implementations§
Source§impl Receipt
impl Receipt
Sourcepub fn verify_signature(&self, _public_key: &[u8]) -> bool
pub fn verify_signature(&self, _public_key: &[u8]) -> bool
Verify the receipt signature (requires Identity). This is a placeholder - actual verification happens via Identity sister.
Sourcepub fn action_type(&self) -> &str
pub fn action_type(&self) -> &str
Get the action type.
Sourcepub fn was_successful(&self) -> bool
pub fn was_successful(&self) -> bool
Check if action was successful.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Receipt
impl<'de> Deserialize<'de> for Receipt
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
Auto Trait Implementations§
impl Freeze for Receipt
impl RefUnwindSafe for Receipt
impl Send for Receipt
impl Sync for Receipt
impl Unpin for Receipt
impl UnsafeUnpin for Receipt
impl UnwindSafe for Receipt
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