Skip to main content

selene_core/database/
deleteable.rs

1use lunar_lib::database::{CompareAndSwapTransaction, CustomTransactionError, DatabaseEntry};
2
3pub trait Deleteable: Sized + DatabaseEntry {
4    /// Deletes `self` from the database
5    ///
6    /// This function should unlink references that point to `self`
7    fn delete<E>(
8        &self,
9    ) -> Result<(Self, CompareAndSwapTransaction<Self::EntryDb>), CustomTransactionError<E>>;
10}