selene-core 0.3.0

selene-core is the backend for Selene, a local-first music player
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::database::{DatabaseEntry, DatabaseError, transaction_args::CompareAndSwapTransaction};

pub trait Createable: Sized + DatabaseEntry {
    type CreateArgs;

    /// Creates a new [`Self`] in the database using [`Self::CreateArgs`]
    fn tx_create(
        cas_tx: &mut CompareAndSwapTransaction,
        args: Self::CreateArgs,
    ) -> Result<Self::Id, DatabaseError>;
}