pub enum Receipt {
Call {
id: ContractId,
to: ContractId,
amount: Word,
asset_id: AssetId,
gas: Word,
param1: Word,
param2: 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: InstructionResult,
pc: Word,
is: Word,
contract_id: Option<ContractId>,
},
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: ScriptExecutionResult,
gas_used: Word,
},
MessageOut {
sender: Address,
recipient: Address,
amount: Word,
nonce: Nonce,
len: Word,
digest: Bytes32,
data: Vec<u8>,
},
}
Variants§
Call
Return
ReturnData
Panic
Revert
Log
LogData
Fields
§
id: ContractId
Transfer
TransferOut
ScriptResult
MessageOut
Implementations§
source§impl Receipt
impl Receipt
pub const fn call( id: ContractId, to: ContractId, amount: Word, asset_id: AssetId, gas: Word, param1: Word, param2: Word, pc: Word, is: Word ) -> Self
pub const fn ret(id: ContractId, val: Word, pc: Word, is: Word) -> Self
pub fn return_data( id: ContractId, ptr: Word, digest: Bytes32, data: Vec<u8>, pc: Word, is: Word ) -> Self
pub const fn return_data_with_len( id: ContractId, ptr: Word, len: Word, digest: Bytes32, data: Vec<u8>, pc: Word, is: Word ) -> Self
pub const fn panic( id: ContractId, reason: InstructionResult, pc: Word, is: Word ) -> Self
pub fn with_panic_contract_id(self, _contract_id: Option<ContractId>) -> 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 fn log_data( id: ContractId, ra: Word, rb: Word, ptr: Word, digest: Bytes32, data: Vec<u8>, pc: Word, is: Word ) -> Self
pub const fn log_data_with_len( 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: ScriptExecutionResult, gas_used: Word ) -> Self
pub fn message_out_from_tx_output( txid: &Bytes32, idx: Word, sender: Address, recipient: Address, amount: Word, data: Vec<u8> ) -> Self
pub fn message_out( sender: Address, recipient: Address, amount: Word, nonce: Nonce, digest: Bytes32, data: Vec<u8> ) -> Self
pub const fn message_out_with_len( sender: Address, recipient: Address, amount: Word, nonce: Nonce, len: Word, digest: Bytes32, data: Vec<u8> ) -> Self
pub fn id(&self) -> Option<&ContractId>
pub const fn pc(&self) -> Option<Word>
pub const fn is(&self) -> Option<Word>
pub 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 param1(&self) -> Option<Word>
pub const fn param2(&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<InstructionResult>
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<&ScriptExecutionResult>
pub const fn gas_used(&self) -> Option<Word>
pub fn message_id(&self) -> Option<MessageId>
pub const fn sender(&self) -> Option<&Address>
pub const fn recipient(&self) -> Option<&Address>
pub const fn nonce(&self) -> Option<&Nonce>
pub const fn contract_id(&self) -> Option<&ContractId>
Trait Implementations§
source§impl Deserializable for Receipt
impl Deserializable for Receipt
source§fn from_bytes(bytes: &[u8]) -> Result<Self>
fn from_bytes(bytes: &[u8]) -> Result<Self>
Deserialization from variable length slices of bytes.
source§impl PartialEq<Receipt> for Receipt
impl PartialEq<Receipt> for Receipt
source§impl Read for Receipt
impl Read for Receipt
source§fn 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 · source§fn 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 moresource§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn 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 more1.0.0 · source§fn 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 more1.6.0 · source§fn 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 moresource§fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf
)Pull some bytes from this source into the specified buffer. Read more
source§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf
)Read the exact number of bytes required to fill
cursor
. Read more1.0.0 · source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere Self: Sized,
Creates a “by reference” adaptor for this instance of
Read
. Read moresource§impl SizedBytes for Receipt
impl SizedBytes for Receipt
source§fn serialized_size(&self) -> usize
fn serialized_size(&self) -> usize
Return the expected serialized size for an instance of the type.
source§impl Write for Receipt
impl Write for Receipt
source§fn write(&mut self, full_buf: &[u8]) -> Result<usize>
fn write(&mut self, full_buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn 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
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
impl Eq 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§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more