pub trait CommonTransactionBuilder<'a, F>{
// Required methods
fn get_mut_common_fields(&mut self) -> &mut CommonFields<'a, F>;
fn into_self(self) -> Self;
// Provided methods
fn with_fee(self, fee: XRPAmount<'a>) -> Self
where Self: Sized { ... }
fn with_sequence(self, sequence: u32) -> Self
where Self: Sized { ... }
fn with_last_ledger_sequence(self, last_ledger_sequence: u32) -> Self
where Self: Sized { ... }
fn with_memo(self, memo: Memo) -> Self
where Self: Sized { ... }
fn with_source_tag(self, source_tag: u32) -> Self
where Self: Sized { ... }
fn with_ticket_sequence(self, ticket_sequence: u32) -> Self
where Self: Sized { ... }
fn with_account_txn_id(self, account_txn_id: Cow<'a, str>) -> Self
where Self: Sized { ... }
}
Expand description
A trait providing common builder methods for all transaction types. This eliminates code duplication across transaction implementations.
Required Methods§
Sourcefn get_mut_common_fields(&mut self) -> &mut CommonFields<'a, F>
fn get_mut_common_fields(&mut self) -> &mut CommonFields<'a, F>
Get mutable reference to common fields
Provided Methods§
Sourcefn with_sequence(self, sequence: u32) -> Selfwhere
Self: Sized,
fn with_sequence(self, sequence: u32) -> Selfwhere
Self: Sized,
Set sequence
Sourcefn with_last_ledger_sequence(self, last_ledger_sequence: u32) -> Selfwhere
Self: Sized,
fn with_last_ledger_sequence(self, last_ledger_sequence: u32) -> Selfwhere
Self: Sized,
Set last ledger sequence
Sourcefn with_source_tag(self, source_tag: u32) -> Selfwhere
Self: Sized,
fn with_source_tag(self, source_tag: u32) -> Selfwhere
Self: Sized,
Set source tag
Sourcefn with_ticket_sequence(self, ticket_sequence: u32) -> Selfwhere
Self: Sized,
fn with_ticket_sequence(self, ticket_sequence: u32) -> Selfwhere
Self: Sized,
Set ticket sequence
Sourcefn with_account_txn_id(self, account_txn_id: Cow<'a, str>) -> Selfwhere
Self: Sized,
fn with_account_txn_id(self, account_txn_id: Cow<'a, str>) -> Selfwhere
Self: Sized,
Set account transaction ID
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.