pub struct Receipt { /* private fields */ }Expand description
A type that wraps a receipt and the index of the milestone in which it was included.
Implementations§
Source§impl Receipt
impl Receipt
Sourcepub fn new(inner: ReceiptPayload, included_in: MilestoneIndex) -> Self
pub fn new(inner: ReceiptPayload, included_in: MilestoneIndex) -> Self
Creates a new Receipt.
Sourcepub fn inner(&self) -> &ReceiptPayload
pub fn inner(&self) -> &ReceiptPayload
Returns the inner receipt of the Receipt.
Sourcepub fn included_in(&self) -> &MilestoneIndex
pub fn included_in(&self) -> &MilestoneIndex
Returns the index of the milestone in which the Receipt was included.
Trait Implementations§
Source§impl Packable for Receipt
impl Packable for Receipt
Source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length of the packed bytes.
Source§fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
Packs the instance to bytes and writes them to the passed writer.
Source§fn unpack_inner<R: Read + ?Sized, const CHECK: bool>(
reader: &mut R,
) -> Result<Self, Self::Error>
fn unpack_inner<R: Read + ?Sized, const CHECK: bool>( reader: &mut R, ) -> Result<Self, Self::Error>
Reads bytes from the passed reader and unpacks them into an instance.
Source§fn pack_new(&self) -> Vec<u8> ⓘ
fn pack_new(&self) -> Vec<u8> ⓘ
Packs the instance to bytes and writes them to a newly allocated vector.
impl Eq for Receipt
impl StructuralPartialEq for Receipt
Auto Trait Implementations§
impl Freeze for Receipt
impl RefUnwindSafe for Receipt
impl Send for Receipt
impl Sync for Receipt
impl Unpin 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