pub struct SignedTransactionBatch { /* private fields */ }Expand description
A batch of signed transactions ready for submission.
Implementations§
Source§impl SignedTransactionBatch
impl SignedTransactionBatch
Sourcepub fn new(transactions: Vec<SignedTransaction>) -> Self
pub fn new(transactions: Vec<SignedTransaction>) -> Self
Creates a new batch from signed transactions.
Sourcepub fn transactions(&self) -> &[SignedTransaction]
pub fn transactions(&self) -> &[SignedTransaction]
Returns the transactions in the batch.
Sourcepub fn into_transactions(self) -> Vec<SignedTransaction>
pub fn into_transactions(self) -> Vec<SignedTransaction>
Consumes the batch and returns the transactions.
Sourcepub async fn submit_all(
self,
client: &FullnodeClient,
) -> Vec<BatchTransactionResult>
pub async fn submit_all( self, client: &FullnodeClient, ) -> Vec<BatchTransactionResult>
Submits all transactions in parallel.
Returns immediately after submission without waiting for confirmation.
Sourcepub async fn submit_and_wait_all(
self,
client: &FullnodeClient,
timeout: Option<Duration>,
) -> Vec<BatchTransactionResult>
pub async fn submit_and_wait_all( self, client: &FullnodeClient, timeout: Option<Duration>, ) -> Vec<BatchTransactionResult>
Submits all transactions in parallel and waits for confirmation.
Each transaction is submitted and then waited on independently.
Sourcepub async fn submit_sequential(
self,
client: &FullnodeClient,
) -> Vec<BatchTransactionResult>
pub async fn submit_sequential( self, client: &FullnodeClient, ) -> Vec<BatchTransactionResult>
Submits transactions sequentially (one at a time).
This is slower but may be needed if transactions depend on each other.
Sourcepub async fn submit_and_wait_sequential(
self,
client: &FullnodeClient,
timeout: Option<Duration>,
) -> Vec<BatchTransactionResult>
pub async fn submit_and_wait_sequential( self, client: &FullnodeClient, timeout: Option<Duration>, ) -> Vec<BatchTransactionResult>
Submits transactions sequentially and waits for each to complete.
This ensures each transaction is confirmed before submitting the next.
Trait Implementations§
Source§impl Clone for SignedTransactionBatch
impl Clone for SignedTransactionBatch
Source§fn clone(&self) -> SignedTransactionBatch
fn clone(&self) -> SignedTransactionBatch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SignedTransactionBatch
impl RefUnwindSafe for SignedTransactionBatch
impl Send for SignedTransactionBatch
impl Sync for SignedTransactionBatch
impl Unpin for SignedTransactionBatch
impl UnsafeUnpin for SignedTransactionBatch
impl UnwindSafe for SignedTransactionBatch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more