pub enum Receipt {
Call {
id: ContractId,
to: ContractId,
amount: Word,
asset_id: AssetId,
gas: Word,
a: Word,
b: Word,
pc: Word,
is: Word,
},
Return {
id: ContractId,
val: Word,
pc: Word,
is: Word,
},
ReturnData {
id: ContractId,
ptr: Word,
len: Word,
digest: Bytes32,
data: Vec<u8>,
pc: Word,
is: Word,
},
Panic {
id: ContractId,
reason: Word,
pc: Word,
is: Word,
},
Revert {
id: ContractId,
ra: Word,
pc: Word,
is: Word,
},
Log {
id: ContractId,
ra: Word,
rb: Word,
rc: Word,
rd: Word,
pc: Word,
is: Word,
},
LogData {
id: ContractId,
ra: Word,
rb: Word,
ptr: Word,
len: Word,
digest: Bytes32,
data: Vec<u8>,
pc: Word,
is: Word,
},
Transfer {
id: ContractId,
to: ContractId,
amount: Word,
asset_id: AssetId,
pc: Word,
is: Word,
},
TransferOut {
id: ContractId,
to: Address,
amount: Word,
asset_id: AssetId,
pc: Word,
is: Word,
},
ScriptResult {
result: InstructionResult,
gas_used: Word,
},
}
Variants
Call
Fields
id: ContractId
to: ContractId
amount: Word
asset_id: AssetId
gas: Word
a: Word
b: Word
pc: Word
is: Word
Return
ReturnData
Panic
Revert
Log
LogData
Transfer
TransferOut
ScriptResult
Implementations
sourceimpl Receipt
impl Receipt
pub const fn call(
id: ContractId,
to: ContractId,
amount: Word,
asset_id: AssetId,
gas: Word,
a: Word,
b: Word,
pc: Word,
is: Word
) -> Self
pub const fn ret(id: ContractId, val: Word, pc: Word, is: Word) -> Self
pub const fn return_data(
id: ContractId,
ptr: Word,
len: Word,
digest: Bytes32,
data: Vec<u8>,
pc: Word,
is: Word
) -> Self
pub const fn panic(id: ContractId, reason: Word, pc: Word, is: Word) -> Self
pub const fn revert(id: ContractId, ra: Word, pc: Word, is: Word) -> Self
pub const fn log(
id: ContractId,
ra: Word,
rb: Word,
rc: Word,
rd: Word,
pc: Word,
is: Word
) -> Self
pub const fn log_data(
id: ContractId,
ra: Word,
rb: Word,
ptr: Word,
len: Word,
digest: Bytes32,
data: Vec<u8>,
pc: Word,
is: Word
) -> Self
pub const fn transfer(
id: ContractId,
to: ContractId,
amount: Word,
asset_id: AssetId,
pc: Word,
is: Word
) -> Self
pub const fn transfer_out(
id: ContractId,
to: Address,
amount: Word,
asset_id: AssetId,
pc: Word,
is: Word
) -> Self
pub const fn script_result(result: InstructionResult, gas_used: Word) -> Self
pub const fn id(&self) -> Option<&ContractId>
pub const fn pc(&self) -> Option<Word>
pub const fn is(&self) -> Option<Word>
pub const fn to(&self) -> Option<&ContractId>
pub const fn to_address(&self) -> Option<&Address>
pub const fn amount(&self) -> Option<Word>
pub const fn asset_id(&self) -> Option<&AssetId>
pub const fn gas(&self) -> Option<Word>
pub const fn a(&self) -> Option<Word>
pub const fn b(&self) -> Option<Word>
pub const fn val(&self) -> Option<Word>
pub const fn ptr(&self) -> Option<Word>
pub const fn len(&self) -> Option<Word>
pub const fn is_empty(&self) -> Option<bool>
pub const fn digest(&self) -> Option<&Bytes32>
pub fn data(&self) -> Option<&[u8]>
pub const fn reason(&self) -> Option<Word>
pub const fn ra(&self) -> Option<Word>
pub const fn rb(&self) -> Option<Word>
pub const fn rc(&self) -> Option<Word>
pub const fn rd(&self) -> Option<Word>
pub const fn result(&self) -> Option<&InstructionResult>
pub const fn gas_used(&self) -> Option<Word>
Trait Implementations
sourceimpl Deserializable for Receipt
impl Deserializable for Receipt
sourceimpl Read for Receipt
impl Read for Receipt
sourcefn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
1.36.0 · sourcefn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
Like read
, except that it reads into a slice of buffers. Read more
sourcefn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
can_vector
)Determines if this Read
er has an efficient read_vectored
implementation. Read more
1.0.0 · sourcefn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>
Read all bytes until EOF in this source, placing them into buf
. Read more
1.0.0 · sourcefn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
Read all bytes until EOF in this source, appending them to buf
. Read more
1.6.0 · sourcefn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
Read the exact number of bytes required to fill buf
. Read more
sourcefn read_buf(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
read_buf
)Pull some bytes from this source into the specified buffer. Read more
sourcefn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
read_buf
)Read the exact number of bytes required to fill buf
. Read more
1.0.0 · sourcefn by_ref(&mut self) -> &mut Self
fn by_ref(&mut self) -> &mut Self
Creates a “by reference” adaptor for this instance of Read
. Read more
sourceimpl SizedBytes for Receipt
impl SizedBytes for Receipt
sourcefn serialized_size(&self) -> usize
fn serialized_size(&self) -> usize
Return the expected serialized size for an instance of the type.
sourceimpl Write for Receipt
impl Write for Receipt
sourcefn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
1.0.0 · sourcefn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
sourcefn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
impl Eq for Receipt
impl StructuralEq for Receipt
impl StructuralPartialEq for Receipt
Auto Trait Implementations
impl RefUnwindSafe for Receipt
impl Send for Receipt
impl Sync for Receipt
impl Unpin for Receipt
impl UnwindSafe for Receipt
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> SerializableVec for T where
T: SizedBytes + Read,
impl<T> SerializableVec for T where
T: SizedBytes + Read,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more