Skip to main content

Createable

Trait Createable 

Source
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§

Required Methods§

Source

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.

Implementors§