Enum bdk_wallet::tx_builder::TxOrdering
source · pub enum TxOrdering {
Shuffle,
Untouched,
Custom {
input_sort: Arc<dyn Fn(&TxIn, &TxIn) -> Ordering>,
output_sort: Arc<dyn Fn(&TxOut, &TxOut) -> Ordering>,
},
}
Expand description
Ordering of the transaction’s inputs and outputs
Variants§
Shuffle
Randomized (default)
Untouched
Unchanged
Custom
Provide custom comparison functions for sorting
Implementations§
source§impl TxOrdering
impl TxOrdering
sourcepub fn sort_tx(&self, tx: &mut Transaction)
pub fn sort_tx(&self, tx: &mut Transaction)
Sort transaction inputs and outputs by TxOrdering
variant.
Uses the thread-local random number generator (rng).
sourcepub fn sort_tx_with_aux_rand(
&self,
tx: &mut Transaction,
rng: &mut impl RngCore
)
pub fn sort_tx_with_aux_rand( &self, tx: &mut Transaction, rng: &mut impl RngCore )
Sort transaction inputs and outputs by TxOrdering
variant.
Uses a provided random number generator (rng).
Trait Implementations§
source§impl Clone for TxOrdering
impl Clone for TxOrdering
source§fn clone(&self) -> TxOrdering
fn clone(&self) -> TxOrdering
Returns a copy 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 moresource§impl Debug for TxOrdering
impl Debug for TxOrdering
source§impl Default for TxOrdering
impl Default for TxOrdering
source§fn default() -> TxOrdering
fn default() -> TxOrdering
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TxOrdering
impl !RefUnwindSafe for TxOrdering
impl !Send for TxOrdering
impl !Sync for TxOrdering
impl Unpin for TxOrdering
impl !UnwindSafe for TxOrdering
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