Trait bdk_chain::Merge

source ·
pub trait Merge: Default {
    // Required methods
    fn merge(&mut self, other: Self);
    fn is_empty(&self) -> bool;

    // Provided method
    fn take(&mut self) -> Option<Self> { ... }
}
Expand description

Trait that makes an object mergeable.

Required Methods§

source

fn merge(&mut self, other: Self)

Merge another object of the same type onto self.

source

fn is_empty(&self) -> bool

Returns whether the structure is considered empty.

Provided Methods§

source

fn take(&mut self) -> Option<Self>

Take the value, replacing it with the default value.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Merge for ()

source§

fn merge(&mut self, _other: ())

source§

fn is_empty(&self) -> bool

source§

impl<K, V> Merge for BTreeMap<K, V>
where K: Ord,

source§

fn merge(&mut self, other: BTreeMap<K, V>)

source§

fn is_empty(&self) -> bool

source§

impl<T0> Merge for (T0,)
where T0: Merge,

source§

fn merge(&mut self, _other: (T0,))

source§

fn is_empty(&self) -> bool

source§

impl<T0, T1> Merge for (T0, T1)
where T0: Merge, T1: Merge,

source§

fn merge(&mut self, _other: (T0, T1))

source§

fn is_empty(&self) -> bool

source§

impl<T0, T1, T2> Merge for (T0, T1, T2)
where T0: Merge, T1: Merge, T2: Merge,

source§

fn merge(&mut self, _other: (T0, T1, T2))

source§

fn is_empty(&self) -> bool

source§

impl<T0, T1, T2, T3> Merge for (T0, T1, T2, T3)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge,

source§

fn merge(&mut self, _other: (T0, T1, T2, T3))

source§

fn is_empty(&self) -> bool

source§

impl<T0, T1, T2, T3, T4> Merge for (T0, T1, T2, T3, T4)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge,

source§

fn merge(&mut self, _other: (T0, T1, T2, T3, T4))

source§

fn is_empty(&self) -> bool

source§

impl<T0, T1, T2, T3, T4, T5> Merge for (T0, T1, T2, T3, T4, T5)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge,

source§

fn merge(&mut self, _other: (T0, T1, T2, T3, T4, T5))

source§

fn is_empty(&self) -> bool

source§

impl<T0, T1, T2, T3, T4, T5, T6> Merge for (T0, T1, T2, T3, T4, T5, T6)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge,

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Merge for (T0, T1, T2, T3, T4, T5, T6, T7)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge,

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge,

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge, T9: Merge,

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge, T9: Merge, T10: Merge,

source§

impl<T> Merge for BTreeSet<T>
where T: Ord,

source§

fn merge(&mut self, other: BTreeSet<T>)

source§

fn is_empty(&self) -> bool

Implementors§

source§

impl Merge for bdk_chain::indexer::keychain_txout::ChangeSet

source§

impl Merge for bdk_chain::local_chain::ChangeSet

source§

impl<A: Ord> Merge for bdk_chain::tx_graph::ChangeSet<A>

source§

impl<A: Anchor, IA: Merge> Merge for bdk_chain::indexed_tx_graph::ChangeSet<A, IA>

source§

impl<T> Merge for Vec<T>