#[non_exhaustive]pub struct TransactionBuilder { /* private fields */ }
Expand description
A builder for Transaction
.
Implementations§
source§impl TransactionBuilder
impl TransactionBuilder
sourcepub fn network(self, input: QueryNetwork) -> Self
pub fn network(self, input: QueryNetwork) -> Self
The blockchain network where the transaction occurred.
This field is required.sourcepub fn set_network(self, input: Option<QueryNetwork>) -> Self
pub fn set_network(self, input: Option<QueryNetwork>) -> Self
The blockchain network where the transaction occurred.
sourcepub fn get_network(&self) -> &Option<QueryNetwork>
pub fn get_network(&self) -> &Option<QueryNetwork>
The blockchain network where the transaction occurred.
sourcepub fn block_hash(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_block_hash(self, input: Option<String>) -> Self
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.
sourcepub fn get_block_hash(&self) -> &Option<String>
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.
sourcepub fn transaction_hash(self, input: impl Into<String>) -> Self
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.sourcepub fn set_transaction_hash(self, input: Option<String>) -> Self
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.
sourcepub fn get_transaction_hash(&self) -> &Option<String>
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.
sourcepub fn block_number(self, input: impl Into<String>) -> Self
pub fn block_number(self, input: impl Into<String>) -> Self
The block number in which the transaction is recorded.
sourcepub fn set_block_number(self, input: Option<String>) -> Self
pub fn set_block_number(self, input: Option<String>) -> Self
The block number in which the transaction is recorded.
sourcepub fn get_block_number(&self) -> &Option<String>
pub fn get_block_number(&self) -> &Option<String>
The block number in which the transaction is recorded.
sourcepub fn transaction_timestamp(self, input: DateTime) -> Self
pub fn transaction_timestamp(self, input: DateTime) -> Self
The Timestamp
of the transaction.
sourcepub fn set_transaction_timestamp(self, input: Option<DateTime>) -> Self
pub fn set_transaction_timestamp(self, input: Option<DateTime>) -> Self
The Timestamp
of the transaction.
sourcepub fn get_transaction_timestamp(&self) -> &Option<DateTime>
pub fn get_transaction_timestamp(&self) -> &Option<DateTime>
The Timestamp
of the transaction.
sourcepub fn transaction_index(self, input: i64) -> Self
pub fn transaction_index(self, input: i64) -> Self
The index of the transaction within a blockchain.
This field is required.sourcepub fn set_transaction_index(self, input: Option<i64>) -> Self
pub fn set_transaction_index(self, input: Option<i64>) -> Self
The index of the transaction within a blockchain.
sourcepub fn get_transaction_index(&self) -> &Option<i64>
pub fn get_transaction_index(&self) -> &Option<i64>
The index of the transaction within a blockchain.
sourcepub fn number_of_transactions(self, input: i64) -> Self
pub fn number_of_transactions(self, input: i64) -> Self
The number of transactions in the block.
This field is required.sourcepub fn set_number_of_transactions(self, input: Option<i64>) -> Self
pub fn set_number_of_transactions(self, input: Option<i64>) -> Self
The number of transactions in the block.
sourcepub fn get_number_of_transactions(&self) -> &Option<i64>
pub fn get_number_of_transactions(&self) -> &Option<i64>
The number of transactions in the block.
sourcepub fn status(self, input: QueryTransactionStatus) -> Self
pub fn status(self, input: QueryTransactionStatus) -> Self
The status of the transaction.
This field is required.sourcepub fn set_status(self, input: Option<QueryTransactionStatus>) -> Self
pub fn set_status(self, input: Option<QueryTransactionStatus>) -> Self
The status of the transaction.
sourcepub fn get_status(&self) -> &Option<QueryTransactionStatus>
pub fn get_status(&self) -> &Option<QueryTransactionStatus>
The status of the transaction.
sourcepub fn to(self, input: impl Into<String>) -> Self
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.sourcepub fn set_to(self, input: Option<String>) -> Self
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.
sourcepub fn get_to(&self) -> &Option<String>
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.
sourcepub fn from(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_from(self, input: Option<String>) -> Self
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.
sourcepub fn get_from(&self) -> &Option<String>
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.
sourcepub fn contract_address(self, input: impl Into<String>) -> Self
pub fn contract_address(self, input: impl Into<String>) -> Self
The blockchain address for the contract.
sourcepub fn set_contract_address(self, input: Option<String>) -> Self
pub fn set_contract_address(self, input: Option<String>) -> Self
The blockchain address for the contract.
sourcepub fn get_contract_address(&self) -> &Option<String>
pub fn get_contract_address(&self) -> &Option<String>
The blockchain address for the contract.
sourcepub fn gas_used(self, input: impl Into<String>) -> Self
pub fn gas_used(self, input: impl Into<String>) -> Self
The amount of gas used for the transaction.
sourcepub fn set_gas_used(self, input: Option<String>) -> Self
pub fn set_gas_used(self, input: Option<String>) -> Self
The amount of gas used for the transaction.
sourcepub fn get_gas_used(&self) -> &Option<String>
pub fn get_gas_used(&self) -> &Option<String>
The amount of gas used for the transaction.
sourcepub fn cumulative_gas_used(self, input: impl Into<String>) -> Self
pub fn cumulative_gas_used(self, input: impl Into<String>) -> Self
The amount of gas used up to the specified point in the block.
sourcepub fn set_cumulative_gas_used(self, input: Option<String>) -> Self
pub fn set_cumulative_gas_used(self, input: Option<String>) -> Self
The amount of gas used up to the specified point in the block.
sourcepub fn get_cumulative_gas_used(&self) -> &Option<String>
pub fn get_cumulative_gas_used(&self) -> &Option<String>
The amount of gas used up to the specified point in the block.
sourcepub fn effective_gas_price(self, input: impl Into<String>) -> Self
pub fn effective_gas_price(self, input: impl Into<String>) -> Self
The effective gas price.
sourcepub fn set_effective_gas_price(self, input: Option<String>) -> Self
pub fn set_effective_gas_price(self, input: Option<String>) -> Self
The effective gas price.
sourcepub fn get_effective_gas_price(&self) -> &Option<String>
pub fn get_effective_gas_price(&self) -> &Option<String>
The effective gas price.
sourcepub fn signature_v(self, input: i32) -> Self
pub fn signature_v(self, input: i32) -> Self
The signature of the transaction. The Z coordinate of a point V.
sourcepub fn set_signature_v(self, input: Option<i32>) -> Self
pub fn set_signature_v(self, input: Option<i32>) -> Self
The signature of the transaction. The Z coordinate of a point V.
sourcepub fn get_signature_v(&self) -> &Option<i32>
pub fn get_signature_v(&self) -> &Option<i32>
The signature of the transaction. The Z coordinate of a point V.
sourcepub fn signature_r(self, input: impl Into<String>) -> Self
pub fn signature_r(self, input: impl Into<String>) -> Self
The signature of the transaction. The X coordinate of a point R.
sourcepub fn set_signature_r(self, input: Option<String>) -> Self
pub fn set_signature_r(self, input: Option<String>) -> Self
The signature of the transaction. The X coordinate of a point R.
sourcepub fn get_signature_r(&self) -> &Option<String>
pub fn get_signature_r(&self) -> &Option<String>
The signature of the transaction. The X coordinate of a point R.
sourcepub fn signature_s(self, input: impl Into<String>) -> Self
pub fn signature_s(self, input: impl Into<String>) -> Self
The signature of the transaction. The Y coordinate of a point S.
sourcepub fn set_signature_s(self, input: Option<String>) -> Self
pub fn set_signature_s(self, input: Option<String>) -> Self
The signature of the transaction. The Y coordinate of a point S.
sourcepub fn get_signature_s(&self) -> &Option<String>
pub fn get_signature_s(&self) -> &Option<String>
The signature of the transaction. The Y coordinate of a point S.
sourcepub fn transaction_fee(self, input: impl Into<String>) -> Self
pub fn transaction_fee(self, input: impl Into<String>) -> Self
The transaction fee.
sourcepub fn set_transaction_fee(self, input: Option<String>) -> Self
pub fn set_transaction_fee(self, input: Option<String>) -> Self
The transaction fee.
sourcepub fn get_transaction_fee(&self) -> &Option<String>
pub fn get_transaction_fee(&self) -> &Option<String>
The transaction fee.
sourcepub fn transaction_id(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_transaction_id(self, input: Option<String>) -> Self
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.
sourcepub fn get_transaction_id(&self) -> &Option<String>
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.
sourcepub fn build(self) -> Result<Transaction, BuildError>
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
impl Clone for TransactionBuilder
source§fn clone(&self) -> TransactionBuilder
fn clone(&self) -> TransactionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TransactionBuilder
impl Debug for TransactionBuilder
source§impl Default for TransactionBuilder
impl Default for TransactionBuilder
source§fn default() -> TransactionBuilder
fn default() -> TransactionBuilder
source§impl PartialEq for TransactionBuilder
impl PartialEq for TransactionBuilder
source§fn eq(&self, other: &TransactionBuilder) -> bool
fn eq(&self, other: &TransactionBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.