Trait CopyFrom

Source
pub trait CopyFrom<FE: ThreadSafe + Clone, I>: Persist<FE> {
    // Required method
    fn copy_from<'life0, 'async_trait>(
        txn: &'life0 <Self as Persist<FE>>::Txn,
        store: Dir<FE>,
        instance: I,
    ) -> Pin<Box<dyn Future<Output = TCResult<Self>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Copy a base state from another instance, possibly a view.

Required Methods§

Source

fn copy_from<'life0, 'async_trait>( txn: &'life0 <Self as Persist<FE>>::Txn, store: Dir<FE>, instance: I, ) -> Pin<Box<dyn Future<Output = TCResult<Self>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Copy a new instance of Self from an existing instance.

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§