pub struct Transaction<C: CellFamily> {
Show 13 fields pub account: CellHash, pub lt: u64, pub prev_trans_hash: CellHash, pub prev_trans_lt: u64, pub now: u32, pub out_msg_count: Uint15, pub orig_status: AccountStatus, pub end_status: AccountStatus, pub in_msg: Option<CellContainer<C>>, pub out_msgs: Dict<C, Uint15, CellContainer<C>>, pub total_fees: CurrencyCollection<C>, pub state_update: Lazy<C, HashUpdate>, pub info: Lazy<C, TxInfo<C>>,
}
Expand description

Blockchain transaction.

Fields§

§account: CellHash

Account on which this transaction was produced.

§lt: u64

Logical time when the transaction was created.

§prev_trans_hash: CellHash

The hash of the previous transaction on the same account.

§prev_trans_lt: u64

The logical time of the previous transaction on the same account.

§now: u32

Unix timestamp when the transaction was created.

§out_msg_count: Uint15

The number of outgoing messages.

§orig_status: AccountStatus

Account status before this transaction.

§end_status: AccountStatus

Account status after this transaction.

§in_msg: Option<CellContainer<C>>

Optional incoming message.

§out_msgs: Dict<C, Uint15, CellContainer<C>>

Outgoing messages.

§total_fees: CurrencyCollection<C>

Total transaction fees (including extra fwd fees).

§state_update: Lazy<C, HashUpdate>

Account state hashes.

§info: Lazy<C, TxInfo<C>>

Detailed transaction info.

Implementations§

source§

impl<C: CellFamily> Transaction<C>

source

pub fn load_in_msg(&self) -> Result<Option<Message<'_, C>>, Error>

Tries to load the incoming message, if present.

source

pub fn load_info(&self) -> Option<TxInfo<C>>

Tries to load the detailed transaction info from the lazy cell.

source§

impl<C> Transaction<C>where for<'c> C: CellFamily + 'c,

source

pub fn iter_out_msgs(&self) -> TxOutMsgIter<'_, C>

Gets an iterator over the output messages of this transaction, in order by lt. The iterator element type is Result<Message<'a, C>>.

If the dictionary or message is invalid, finishes after the first invalid element, returning an error.

Trait Implementations§

source§

impl<C: CellFamily> Clone for Transaction<C>

source§

fn clone(&self) -> Self

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<C: CellFamily> Debug for Transaction<C>

source§

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

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

impl<'a, C: CellFamily> Load<'a, C> for Transaction<C>

source§

fn load_from(slice: &mut CellSlice<'a, C>) -> Option<Self>

Tries to load itself from a cell slice.
source§

impl<C: CellFamily> PartialEq<Transaction<C>> for Transaction<C>

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<C: CellFamily> Store<C> for Transaction<C>

source§

fn store_into( &self, builder: &mut CellBuilder<C>, finalizer: &mut dyn Finalizer<C> ) -> bool

Tries to store itself into the cell builder.
source§

impl<C: CellFamily> Eq for Transaction<C>

Auto Trait Implementations§

§

impl<C> RefUnwindSafe for Transaction<C>where <C as CellFamily>::Container: RefUnwindSafe,

§

impl<C> Send for Transaction<C>where <C as CellFamily>::Container: Send,

§

impl<C> Sync for Transaction<C>where <C as CellFamily>::Container: Sync,

§

impl<C> Unpin for Transaction<C>where <C as CellFamily>::Container: Unpin,

§

impl<C> UnwindSafe for Transaction<C>where <C as CellFamily>::Container: UnwindSafe,

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,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> 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.
const: unstable · 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.
const: unstable · source§

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

Performs the conversion.