Skip to main content

Mergeable

Trait Mergeable 

Source
pub trait Mergeable: DatabaseEntry {
    type Err;

    // Required method
    fn tx_merge(
        &self,
        into: Self::Id,
        cas_tx: &mut CompareAndSwapTransaction<Self::EntryDb>,
    ) -> Result<(), CustomTransactionError<Self::Err>>;
}

Required Associated Types§

Required Methods§

Source

fn tx_merge( &self, into: Self::Id, cas_tx: &mut CompareAndSwapTransaction<Self::EntryDb>, ) -> Result<(), CustomTransactionError<Self::Err>>

Merges Self into the into entry

This means the identifier of to will be preserved, while Self is deleted All references to Self should be relinked to into

This function should be a single atomic transaction

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.

Implementors§