pub enum Receipt {
Call {
id: ContractId,
to: ContractId,
amount: u64,
asset_id: AssetId,
gas: u64,
param1: u64,
param2: u64,
pc: u64,
is: u64,
},
Return {
id: ContractId,
val: u64,
pc: u64,
is: u64,
},
ReturnData {
id: ContractId,
ptr: u64,
len: u64,
digest: Bytes32,
data: Vec<u8, Global>,
pc: u64,
is: u64,
},
Panic {
id: ContractId,
reason: InstructionResult,
pc: u64,
is: u64,
},
Revert {
id: ContractId,
ra: u64,
pc: u64,
is: u64,
},
Log {
id: ContractId,
ra: u64,
rb: u64,
rc: u64,
rd: u64,
pc: u64,
is: u64,
},
LogData {
id: ContractId,
ra: u64,
rb: u64,
ptr: u64,
len: u64,
digest: Bytes32,
data: Vec<u8, Global>,
pc: u64,
is: u64,
},
Transfer {
id: ContractId,
to: ContractId,
amount: u64,
asset_id: AssetId,
pc: u64,
is: u64,
},
TransferOut {
id: ContractId,
to: Address,
amount: u64,
asset_id: AssetId,
pc: u64,
is: u64,
},
ScriptResult {
result: ScriptExecutionResult,
gas_used: u64,
},
}
Variants
Call
Fields
id: ContractId
to: ContractId
amount: u64
asset_id: AssetId
gas: u64
param1: u64
param2: u64
pc: u64
is: u64
Return
ReturnData
Panic
Revert
Log
LogData
Transfer
TransferOut
ScriptResult
Implementations
sourceimpl Receipt
impl Receipt
pub const fn call(
id: ContractId,
to: ContractId,
amount: u64,
asset_id: AssetId,
gas: u64,
param1: u64,
param2: u64,
pc: u64,
is: u64
) -> ReceiptⓘNotable traits for Receiptimpl Write for Receiptimpl Read for Receipt
pub const fn ret(id: ContractId, val: u64, pc: u64, is: u64) -> ReceiptⓘNotable traits for Receiptimpl Write for Receiptimpl Read for Receipt
pub const fn return_data(
id: ContractId,
ptr: u64,
len: u64,
digest: Bytes32,
data: Vec<u8, Global>,
pc: u64,
is: u64
) -> ReceiptⓘNotable traits for Receiptimpl Write for Receiptimpl Read for Receipt
pub const fn panic(
id: ContractId,
reason: InstructionResult,
pc: u64,
is: u64
) -> ReceiptⓘNotable traits for Receiptimpl Write for Receiptimpl Read for Receipt
pub const fn revert(id: ContractId, ra: u64, pc: u64, is: u64) -> ReceiptⓘNotable traits for Receiptimpl Write for Receiptimpl Read for Receipt
pub const fn log(
id: ContractId,
ra: u64,
rb: u64,
rc: u64,
rd: u64,
pc: u64,
is: u64
) -> ReceiptⓘNotable traits for Receiptimpl Write for Receiptimpl Read for Receipt
pub const fn log_data(
id: ContractId,
ra: u64,
rb: u64,
ptr: u64,
len: u64,
digest: Bytes32,
data: Vec<u8, Global>,
pc: u64,
is: u64
) -> ReceiptⓘNotable traits for Receiptimpl Write for Receiptimpl Read for Receipt
pub const fn transfer(
id: ContractId,
to: ContractId,
amount: u64,
asset_id: AssetId,
pc: u64,
is: u64
) -> ReceiptⓘNotable traits for Receiptimpl Write for Receiptimpl Read for Receipt
pub const fn transfer_out(
id: ContractId,
to: Address,
amount: u64,
asset_id: AssetId,
pc: u64,
is: u64
) -> ReceiptⓘNotable traits for Receiptimpl Write for Receiptimpl Read for Receipt
pub const fn script_result(
result: ScriptExecutionResult,
gas_used: u64
) -> ReceiptⓘNotable traits for Receiptimpl Write for Receiptimpl Read for Receipt
pub const fn id(&self) -> Option<&ContractId>
pub const fn pc(&self) -> Option<u64>
pub const fn is(&self) -> Option<u64>
pub const fn to(&self) -> Option<&ContractId>
pub const fn to_address(&self) -> Option<&Address>
pub const fn amount(&self) -> Option<u64>
pub const fn asset_id(&self) -> Option<&AssetId>
pub const fn gas(&self) -> Option<u64>
pub const fn param1(&self) -> Option<u64>
pub const fn param2(&self) -> Option<u64>
pub const fn val(&self) -> Option<u64>
pub const fn ptr(&self) -> Option<u64>
pub const fn len(&self) -> Option<u64>
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<u64>
pub const fn rb(&self) -> Option<u64>
pub const fn rc(&self) -> Option<u64>
pub const fn rd(&self) -> Option<u64>
pub const fn result(&self) -> Option<&ScriptExecutionResult>
pub const fn gas_used(&self) -> Option<u64>
Trait Implementations
sourceimpl Deserializable for Receipt
impl Deserializable for Receipt
sourceimpl<'de> Deserialize<'de> for Receipt
impl<'de> Deserialize<'de> for Receipt
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Receipt, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Receipt, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Read for Receipt
impl Read for Receipt
sourcefn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
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 Serialize for Receipt
impl Serialize for Receipt
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. 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, Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn flush(&mut self) -> Result<(), Error>
fn flush(&mut self) -> Result<(), Error>
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