pub struct BundleBuilder<'a, C> { /* private fields */ }
Expand description
Buidler for transaction bundle.
Implementations§
Source§impl<C> BundleBuilder<'_, C>
impl<C> BundleBuilder<'_, C>
Sourcepub fn new(cluster: Cluster) -> Self
pub fn new(cluster: Cluster) -> Self
Create a new BundleBuilder
for the given cluster.
Sourcepub fn new_with_options(options: CreateBundleOptions) -> Self
pub fn new_with_options(options: CreateBundleOptions) -> Self
Create a new BundleBuilder
with the given options.
Sourcepub fn from_rpc_client(client: RpcClient) -> Self
pub fn from_rpc_client(client: RpcClient) -> Self
Create a new BundleBuilder
from [RpcClient
].
Sourcepub fn from_rpc_client_with_options(
client: RpcClient,
options: BundleOptions,
) -> Self
pub fn from_rpc_client_with_options( client: RpcClient, options: BundleOptions, ) -> Self
Create a new BundleBuilder
from [RpcClient
] with the given options.
Sourcepub fn packet_size(&self) -> usize
pub fn packet_size(&self) -> usize
Get packet size.
Sourcepub fn try_clone_empty(&self) -> Result<Self>
pub fn try_clone_empty(&self) -> Result<Self>
Try clone empty.
Sourcepub fn set_options(&mut self, options: BundleOptions) -> &mut Self
pub fn set_options(&mut self, options: BundleOptions) -> &mut Self
Set options.
Source§impl<'a, C: Deref<Target = impl Signer> + Clone> BundleBuilder<'a, C>
impl<'a, C: Deref<Target = impl Signer> + Clone> BundleBuilder<'a, C>
Sourcepub fn try_push_with_opts(
&mut self,
txn: TransactionBuilder<'a, C>,
new_transaction: bool,
) -> Result<&mut Self, (TransactionBuilder<'a, C>, Error)>
pub fn try_push_with_opts( &mut self, txn: TransactionBuilder<'a, C>, new_transaction: bool, ) -> Result<&mut Self, (TransactionBuilder<'a, C>, Error)>
Push a TransactionBuilder
with options.
Sourcepub fn try_push(
&mut self,
txn: TransactionBuilder<'a, C>,
) -> Result<&mut Self, (TransactionBuilder<'a, C>, Error)>
pub fn try_push( &mut self, txn: TransactionBuilder<'a, C>, ) -> Result<&mut Self, (TransactionBuilder<'a, C>, Error)>
Try to push a TransactionBuilder
to the builder.
Sourcepub fn push(&mut self, txn: TransactionBuilder<'a, C>) -> Result<&mut Self>
pub fn push(&mut self, txn: TransactionBuilder<'a, C>) -> Result<&mut Self>
Push a TransactionBuilder
.
Sourcepub fn push_many(
&mut self,
txns: impl IntoIterator<Item = TransactionBuilder<'a, C>>,
new_transaction: bool,
) -> Result<&mut Self>
pub fn push_many( &mut self, txns: impl IntoIterator<Item = TransactionBuilder<'a, C>>, new_transaction: bool, ) -> Result<&mut Self>
Push TransactionBuilder
s.
Sourcepub fn into_builders(self) -> Vec<TransactionBuilder<'a, C>>
pub fn into_builders(self) -> Vec<TransactionBuilder<'a, C>>
Get back all collected TransactionBuilder
s.
Sourcepub async fn send_all(
self,
skip_preflight: bool,
) -> Result<Vec<Signature>, (Vec<Signature>, Error)>
pub async fn send_all( self, skip_preflight: bool, ) -> Result<Vec<Signature>, (Vec<Signature>, Error)>
Send all in order and returns the signatures of the success transactions.
Sourcepub async fn send_all_with_opts(
self,
opts: SendBundleOptions,
) -> Result<Vec<WithSlot<Signature>>, (Vec<WithSlot<Signature>>, Error)>
pub async fn send_all_with_opts( self, opts: SendBundleOptions, ) -> Result<Vec<WithSlot<Signature>>, (Vec<WithSlot<Signature>>, Error)>
Send all in order with the given options and returns the signatures of the success transactions.
Trait Implementations§
Source§impl<'a, C> From<BundleBuilder<'a, C>> for OnceMakeBundleBuilder<'a, C>
impl<'a, C> From<BundleBuilder<'a, C>> for OnceMakeBundleBuilder<'a, C>
Source§fn from(value: BundleBuilder<'a, C>) -> Self
fn from(value: BundleBuilder<'a, C>) -> Self
Converts to this type from the input type.
Source§impl<'a, C> IntoIterator for BundleBuilder<'a, C>
impl<'a, C> IntoIterator for BundleBuilder<'a, C>
Source§type Item = TransactionBuilder<'a, C>
type Item = TransactionBuilder<'a, C>
The type of the elements being iterated over.
Source§type IntoIter = <Vec<TransactionBuilder<'a, C>> as IntoIterator>::IntoIter
type IntoIter = <Vec<TransactionBuilder<'a, C>> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
Auto Trait Implementations§
impl<'a, C> !Freeze for BundleBuilder<'a, C>
impl<'a, C> !RefUnwindSafe for BundleBuilder<'a, C>
impl<'a, C> !Send for BundleBuilder<'a, C>
impl<'a, C> !Sync for BundleBuilder<'a, C>
impl<'a, C> Unpin for BundleBuilder<'a, C>where
C: Unpin,
impl<'a, C> !UnwindSafe for BundleBuilder<'a, C>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more