Struct TransactionBuilder
pub struct TransactionBuilder<T> { /* private fields */ }Expand description
Helper to build transactions
Implementations§
§impl TransactionBuilder<CommonTransactionData>
impl TransactionBuilder<CommonTransactionData>
pub const fn with_nonce(
self,
nonce: u64,
) -> TransactionBuilder<CommonTransactionData>
pub const fn with_nonce( self, nonce: u64, ) -> TransactionBuilder<CommonTransactionData>
Add a nonce to the transaction
pub const fn with_epoch(
self,
epoch: u64,
) -> TransactionBuilder<CommonTransactionData>
pub const fn with_epoch( self, epoch: u64, ) -> TransactionBuilder<CommonTransactionData>
Add an epoch to the transaction
pub const fn with_fee(
self,
fee: TransactionFee,
) -> TransactionBuilder<CommonTransactionData>
pub const fn with_fee( self, fee: TransactionFee, ) -> TransactionBuilder<CommonTransactionData>
Add a fee to the transaction
pub const fn with_fee_tip(
self,
tip: u64,
) -> TransactionBuilder<CommonTransactionData>
pub const fn with_fee_tip( self, tip: u64, ) -> TransactionBuilder<CommonTransactionData>
Add a fee tip in plancks to the transaction
pub fn with_tx<T>(
self,
tx_data: T,
) -> TransactionBuilder<Transaction<<T as IntoToplevel>::Toplevel>>where
T: IntoToplevel,
pub fn with_tx<T>(
self,
tx_data: T,
) -> TransactionBuilder<Transaction<<T as IntoToplevel>::Toplevel>>where
T: IntoToplevel,
Add actual transaction data to the transaction
§impl<T> TransactionBuilder<Transaction<T>>where
T: TransactionType,
impl<T> TransactionBuilder<Transaction<T>>where
T: TransactionType,
pub fn build(self) -> Transaction<T>
pub fn build(self) -> Transaction<T>
Consume builder and return the built transaction
pub fn sign_with_ed25519(
self,
signer: &PrivKey,
) -> Result<SignedTransaction<T>, SignError>
pub fn sign_with_ed25519( self, signer: &PrivKey, ) -> Result<SignedTransaction<T>, SignError>
Consumes this builder, creates and signs a SignedTransaction with an ed25519
signature.
Trait Implementations§
§impl<T> Debug for TransactionBuilder<T>where
T: Debug,
impl<T> Debug for TransactionBuilder<T>where
T: Debug,
§impl<T> Default for TransactionBuilder<T>where
T: Default,
impl<T> Default for TransactionBuilder<T>where
T: Default,
§fn default() -> TransactionBuilder<T>
fn default() -> TransactionBuilder<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for TransactionBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for TransactionBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for TransactionBuilder<T>where
T: Send,
impl<T> Sync for TransactionBuilder<T>where
T: Sync,
impl<T> Unpin for TransactionBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for TransactionBuilder<T>where
T: UnwindSafe,
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
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request