Enum fuel_tx::Receipt

source ·
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 {
        message_id: MessageId,
        sender: Address,
        recipient: Address,
        amount: Word,
        nonce: Bytes32,
        len: Word,
        digest: Bytes32,
        data: Vec<u8>,
    },
}

Variants§

§

Call

Fields

§amount: Word
§asset_id: AssetId
§gas: Word
§param1: Word
§param2: Word
§pc: Word
§is: Word
§

Return

Fields

§val: Word
§pc: Word
§is: Word
§

ReturnData

Fields

§ptr: Word
§len: Word
§digest: Bytes32
§data: Vec<u8>
§pc: Word
§is: Word
§

Panic

Fields

§pc: Word
§is: Word
§contract_id: Option<ContractId>
§

Revert

Fields

§ra: Word
§pc: Word
§is: Word
§

Log

Fields

§ra: Word
§rb: Word
§rc: Word
§rd: Word
§pc: Word
§is: Word
§

LogData

Fields

§ra: Word
§rb: Word
§ptr: Word
§len: Word
§digest: Bytes32
§data: Vec<u8>
§pc: Word
§is: Word
§

Transfer

Fields

§amount: Word
§asset_id: AssetId
§pc: Word
§is: Word
§

TransferOut

Fields

§amount: Word
§asset_id: AssetId
§pc: Word
§is: Word
§

ScriptResult

Fields

§gas_used: Word
§

MessageOut

Fields

§message_id: MessageId
§sender: Address
§recipient: Address
§amount: Word
§nonce: Bytes32
§len: Word
§digest: Bytes32
§data: Vec<u8>

Implementations§

source§

impl Receipt

source

pub const fn call( id: ContractId, to: ContractId, amount: Word, asset_id: AssetId, gas: Word, param1: Word, param2: Word, pc: Word, is: Word ) -> Self

source

pub const fn ret(id: ContractId, val: Word, pc: Word, is: Word) -> Self

source

pub fn return_data( id: ContractId, ptr: Word, digest: Bytes32, data: Vec<u8>, pc: Word, is: Word ) -> Self

source

pub const fn return_data_with_len( id: ContractId, ptr: Word, len: Word, digest: Bytes32, data: Vec<u8>, pc: Word, is: Word ) -> Self

source

pub const fn panic( id: ContractId, reason: InstructionResult, pc: Word, is: Word ) -> Self

source

pub fn with_panic_contract_id(self, _contract_id: Option<ContractId>) -> Self

source

pub const fn revert(id: ContractId, ra: Word, pc: Word, is: Word) -> Self

source

pub const fn log( id: ContractId, ra: Word, rb: Word, rc: Word, rd: Word, pc: Word, is: Word ) -> Self

source

pub fn log_data( id: ContractId, ra: Word, rb: Word, ptr: Word, digest: Bytes32, data: Vec<u8>, pc: Word, is: Word ) -> Self

source

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

source

pub const fn transfer( id: ContractId, to: ContractId, amount: Word, asset_id: AssetId, pc: Word, is: Word ) -> Self

source

pub const fn transfer_out( id: ContractId, to: Address, amount: Word, asset_id: AssetId, pc: Word, is: Word ) -> Self

source

pub const fn script_result( result: ScriptExecutionResult, gas_used: Word ) -> Self

source

pub fn message_out_from_tx_output( txid: &Bytes32, idx: Word, sender: Address, recipient: Address, amount: Word, data: Vec<u8> ) -> Self

source

pub fn message_out( message_id: MessageId, sender: Address, recipient: Address, amount: Word, nonce: Bytes32, digest: Bytes32, data: Vec<u8> ) -> Self

source

pub const fn message_out_with_len( message_id: MessageId, sender: Address, recipient: Address, amount: Word, nonce: Bytes32, len: Word, digest: Bytes32, data: Vec<u8> ) -> Self

source

pub fn id(&self) -> Option<&ContractId>

source

pub const fn pc(&self) -> Option<Word>

source

pub const fn is(&self) -> Option<Word>

source

pub fn to(&self) -> Option<&ContractId>

source

pub const fn to_address(&self) -> Option<&Address>

source

pub const fn amount(&self) -> Option<Word>

source

pub const fn asset_id(&self) -> Option<&AssetId>

source

pub const fn gas(&self) -> Option<Word>

source

pub const fn param1(&self) -> Option<Word>

source

pub const fn param2(&self) -> Option<Word>

source

pub const fn val(&self) -> Option<Word>

source

pub const fn ptr(&self) -> Option<Word>

source

pub const fn len(&self) -> Option<Word>

source

pub const fn is_empty(&self) -> Option<bool>

source

pub const fn digest(&self) -> Option<&Bytes32>

source

pub fn data(&self) -> Option<&[u8]>

source

pub const fn reason(&self) -> Option<InstructionResult>

source

pub const fn ra(&self) -> Option<Word>

source

pub const fn rb(&self) -> Option<Word>

source

pub const fn rc(&self) -> Option<Word>

source

pub const fn rd(&self) -> Option<Word>

source

pub const fn result(&self) -> Option<&ScriptExecutionResult>

source

pub const fn gas_used(&self) -> Option<Word>

source

pub const fn message_id(&self) -> Option<&MessageId>

source

pub const fn sender(&self) -> Option<&Address>

source

pub const fn recipient(&self) -> Option<&Address>

source

pub const fn nonce(&self) -> Option<&Bytes32>

source

pub const fn contract_id(&self) -> Option<&ContractId>

Trait Implementations§

source§

impl Clone for Receipt

source§

fn clone(&self) -> Receipt

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Receipt

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deserializable for Receipt

source§

fn from_bytes(bytes: &[u8]) -> Result<Self>

Deserialization from variable length slices of bytes.
source§

impl Hash for Receipt

source§

fn hash<__H>(&self, __state: &mut __H)where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Receipt> for Receipt

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Read for Receipt

source§

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>

Like read, except that it reads into a slice of buffers. Read more
source§

fn is_read_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored implementation. Read more
1.0.0 · source§

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 · source§

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 · source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Read the exact number of bytes required to fill buf. Read more
source§

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>

🔬This is a nightly-only experimental API. (read_buf)
Read the exact number of bytes required to fill cursor. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Selfwhere Self: Sized,

Creates a “by reference” adaptor for this instance of Read. Read more
1.0.0 · source§

fn bytes(self) -> Bytes<Self>where Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 · source§

fn chain<R>(self, next: R) -> Chain<Self, R>where R: Read, Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 · source§

fn take(self, limit: u64) -> Take<Self>where Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
source§

impl SizedBytes for Receipt

source§

fn serialized_size(&self) -> usize

Return the expected serialized size for an instance of the type.
source§

impl Write for Receipt

source§

fn write(&mut self, buf: &[u8]) -> Result<usize>

Write a buffer into this writer, returning how many bytes were written. Read more
source§

fn flush(&mut self) -> Result<()>

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
1.36.0 · source§

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes from a slice of buffers. Read more
source§

fn is_write_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
1.0.0 · source§

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>

🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
1.0.0 · source§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error encountered. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Selfwhere Self: Sized,

Creates a “by reference” adapter for this instance of Write. Read more
source§

impl Eq for Receipt

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

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,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> SerializableVec for Twhere T: SizedBytes + Read,

source§

fn to_bytes(&mut self) -> Vec<u8, Global>

Create a variable size vector of bytes from the instance.
§

impl<T> StorageAsMut for T

§

fn storage<Type>(&mut self) -> StorageMut<'_, Self, Type>where Type: Mappable,

§

fn storage_as_mut<Type>(&mut self) -> StorageMut<'_, Self, Type>where Type: Mappable,

§

impl<T> StorageAsRef for T

§

fn storage<Type>(&self) -> StorageRef<'_, Self, Type>where Type: Mappable,

§

fn storage_as_ref<Type>(&self) -> StorageRef<'_, Self, Type>where Type: Mappable,

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V