pub struct ReceiptWire(pub [u8; 72]);Expand description
Raw wire receipt buffer.
Stores at least the legacy 64-byte receipt; the extra 8 bytes of the 0.2+ format live in the tail. This is primarily useful when the consumer wants to treat the receipt as an opaque blob for storage.
Tuple Fields§
§0: [u8; 72]Implementations§
Source§impl ReceiptWire
impl ReceiptWire
Sourcepub fn from_slice(buf: &[u8]) -> Result<Self, ReceiptError>
pub fn from_slice(buf: &[u8]) -> Result<Self, ReceiptError>
Copy the first RECEIPT_SIZE bytes of buf into a new ReceiptWire.
If buf is only RECEIPT_SIZE_LEGACY bytes, the tail is zero-filled
(meaning “no failure recorded”).
Trait Implementations§
Source§impl Clone for ReceiptWire
impl Clone for ReceiptWire
Source§fn clone(&self) -> ReceiptWire
fn clone(&self) -> ReceiptWire
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 ReceiptWire
impl Debug for ReceiptWire
impl Copy for ReceiptWire
Auto Trait Implementations§
impl Freeze for ReceiptWire
impl RefUnwindSafe for ReceiptWire
impl Send for ReceiptWire
impl Sync for ReceiptWire
impl Unpin for ReceiptWire
impl UnsafeUnpin for ReceiptWire
impl UnwindSafe for ReceiptWire
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