#[non_exhaustive]
pub struct TransactionBuilder { /* private fields */ }
Expand description

A builder for Transaction.

Implementations§

source§

impl TransactionBuilder

source

pub fn network(self, input: QueryNetwork) -> Self

The blockchain network where the transaction occurred.

This field is required.
source

pub fn set_network(self, input: Option<QueryNetwork>) -> Self

The blockchain network where the transaction occurred.

source

pub fn get_network(&self) -> &Option<QueryNetwork>

The blockchain network where the transaction occurred.

source

pub fn block_hash(self, input: impl Into<String>) -> Self

The block hash is a unique identifier for a block. It is a fixed-size string that is calculated by using the information in the block. The block hash is used to verify the integrity of the data in the block.

source

pub fn set_block_hash(self, input: Option<String>) -> Self

The block hash is a unique identifier for a block. It is a fixed-size string that is calculated by using the information in the block. The block hash is used to verify the integrity of the data in the block.

source

pub fn get_block_hash(&self) -> &Option<String>

The block hash is a unique identifier for a block. It is a fixed-size string that is calculated by using the information in the block. The block hash is used to verify the integrity of the data in the block.

source

pub fn transaction_hash(self, input: impl Into<String>) -> Self

The hash of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

This field is required.
source

pub fn set_transaction_hash(self, input: Option<String>) -> Self

The hash of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

source

pub fn get_transaction_hash(&self) -> &Option<String>

The hash of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

source

pub fn block_number(self, input: impl Into<String>) -> Self

The block number in which the transaction is recorded.

source

pub fn set_block_number(self, input: Option<String>) -> Self

The block number in which the transaction is recorded.

source

pub fn get_block_number(&self) -> &Option<String>

The block number in which the transaction is recorded.

source

pub fn transaction_timestamp(self, input: DateTime) -> Self

The Timestamp of the transaction.

This field is required.
source

pub fn set_transaction_timestamp(self, input: Option<DateTime>) -> Self

The Timestamp of the transaction.

source

pub fn get_transaction_timestamp(&self) -> &Option<DateTime>

The Timestamp of the transaction.

source

pub fn transaction_index(self, input: i64) -> Self

The index of the transaction within a blockchain.

This field is required.
source

pub fn set_transaction_index(self, input: Option<i64>) -> Self

The index of the transaction within a blockchain.

source

pub fn get_transaction_index(&self) -> &Option<i64>

The index of the transaction within a blockchain.

source

pub fn number_of_transactions(self, input: i64) -> Self

The number of transactions in the block.

This field is required.
source

pub fn set_number_of_transactions(self, input: Option<i64>) -> Self

The number of transactions in the block.

source

pub fn get_number_of_transactions(&self) -> &Option<i64>

The number of transactions in the block.

source

pub fn status(self, input: QueryTransactionStatus) -> Self

The status of the transaction.

This field is required.
source

pub fn set_status(self, input: Option<QueryTransactionStatus>) -> Self

The status of the transaction.

source

pub fn get_status(&self) -> &Option<QueryTransactionStatus>

The status of the transaction.

source

pub fn to(self, input: impl Into<String>) -> Self

The identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

This field is required.
source

pub fn set_to(self, input: Option<String>) -> Self

The identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

source

pub fn get_to(&self) -> &Option<String>

The identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

source

pub fn from(self, input: impl Into<String>) -> Self

The initiator of the transaction. It is either in the form a public key or a contract address.

source

pub fn set_from(self, input: Option<String>) -> Self

The initiator of the transaction. It is either in the form a public key or a contract address.

source

pub fn get_from(&self) -> &Option<String>

The initiator of the transaction. It is either in the form a public key or a contract address.

source

pub fn contract_address(self, input: impl Into<String>) -> Self

The blockchain address for the contract.

source

pub fn set_contract_address(self, input: Option<String>) -> Self

The blockchain address for the contract.

source

pub fn get_contract_address(&self) -> &Option<String>

The blockchain address for the contract.

source

pub fn gas_used(self, input: impl Into<String>) -> Self

The amount of gas used for the transaction.

source

pub fn set_gas_used(self, input: Option<String>) -> Self

The amount of gas used for the transaction.

source

pub fn get_gas_used(&self) -> &Option<String>

The amount of gas used for the transaction.

source

pub fn cumulative_gas_used(self, input: impl Into<String>) -> Self

The amount of gas used up to the specified point in the block.

source

pub fn set_cumulative_gas_used(self, input: Option<String>) -> Self

The amount of gas used up to the specified point in the block.

source

pub fn get_cumulative_gas_used(&self) -> &Option<String>

The amount of gas used up to the specified point in the block.

source

pub fn effective_gas_price(self, input: impl Into<String>) -> Self

The effective gas price.

source

pub fn set_effective_gas_price(self, input: Option<String>) -> Self

The effective gas price.

source

pub fn get_effective_gas_price(&self) -> &Option<String>

The effective gas price.

source

pub fn signature_v(self, input: i32) -> Self

The signature of the transaction. The Z coordinate of a point V.

source

pub fn set_signature_v(self, input: Option<i32>) -> Self

The signature of the transaction. The Z coordinate of a point V.

source

pub fn get_signature_v(&self) -> &Option<i32>

The signature of the transaction. The Z coordinate of a point V.

source

pub fn signature_r(self, input: impl Into<String>) -> Self

The signature of the transaction. The X coordinate of a point R.

source

pub fn set_signature_r(self, input: Option<String>) -> Self

The signature of the transaction. The X coordinate of a point R.

source

pub fn get_signature_r(&self) -> &Option<String>

The signature of the transaction. The X coordinate of a point R.

source

pub fn signature_s(self, input: impl Into<String>) -> Self

The signature of the transaction. The Y coordinate of a point S.

source

pub fn set_signature_s(self, input: Option<String>) -> Self

The signature of the transaction. The Y coordinate of a point S.

source

pub fn get_signature_s(&self) -> &Option<String>

The signature of the transaction. The Y coordinate of a point S.

source

pub fn transaction_fee(self, input: impl Into<String>) -> Self

The transaction fee.

source

pub fn set_transaction_fee(self, input: Option<String>) -> Self

The transaction fee.

source

pub fn get_transaction_fee(&self) -> &Option<String>

The transaction fee.

source

pub fn transaction_id(self, input: impl Into<String>) -> Self

The unique identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

source

pub fn set_transaction_id(self, input: Option<String>) -> Self

The unique identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

source

pub fn get_transaction_id(&self) -> &Option<String>

The unique identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

source

pub fn build(self) -> Result<Transaction, BuildError>

Consumes the builder and constructs a Transaction. This method will fail if any of the following fields are not set:

Trait Implementations§

source§

impl Clone for TransactionBuilder

source§

fn clone(&self) -> TransactionBuilder

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 TransactionBuilder

source§

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

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

impl Default for TransactionBuilder

source§

fn default() -> TransactionBuilder

Returns the “default value” for a type. Read more
source§

impl PartialEq for TransactionBuilder

source§

fn eq(&self, other: &TransactionBuilder) -> 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 StructuralPartialEq for TransactionBuilder

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

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<Unshared, Shared> IntoShared<Shared> for Unsharedwhere Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same 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.
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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more