pub trait Createable: Sized + DatabaseEntry {
type CreateArgs: Clone;
type Err;
// Required method
fn tx_create(
cas_tx: &mut CompareAndSwapTransaction<Self::EntryDb>,
args: Self::CreateArgs,
) -> Result<Self, CustomTransactionError<Self::Err>>;
}Required Associated Types§
type CreateArgs: Clone
type Err
Required Methods§
Sourcefn tx_create(
cas_tx: &mut CompareAndSwapTransaction<Self::EntryDb>,
args: Self::CreateArgs,
) -> Result<Self, CustomTransactionError<Self::Err>>
fn tx_create( cas_tx: &mut CompareAndSwapTransaction<Self::EntryDb>, args: Self::CreateArgs, ) -> Result<Self, CustomTransactionError<Self::Err>>
Creates a new Self in the database using Self::CreateArgs
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.