pub trait Createable: Sized + DatabaseEntry {
type CreateArgs;
// Required method
fn tx_create(
cas_tx: &mut CompareAndSwapTransaction,
args: Self::CreateArgs,
) -> Result<Self::Id, DatabaseError>;
}Required Associated Types§
type CreateArgs
Required Methods§
Sourcefn tx_create(
cas_tx: &mut CompareAndSwapTransaction,
args: Self::CreateArgs,
) -> Result<Self::Id, DatabaseError>
fn tx_create( cas_tx: &mut CompareAndSwapTransaction, args: Self::CreateArgs, ) -> Result<Self::Id, DatabaseError>
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.