DeletableModel

Trait DeletableModel 

Source
pub trait DeletableModel:
    BaseModel
    + Send
    + Sync
    + 'static {
    type DeleteOptions: Send + Sync + Default;

    // Required methods
    fn get_delete_handlers() -> &'static LazyLock<DeleteListenerList<Self>>;
    fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 State,
        options: Self::DeleteOptions,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn register_delete_handler<'async_trait, F>(
        priority: ListenerPriority,
        callback: F,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where F: 'async_trait + for<'a> Fn(&'a Self, &'a Self::DeleteOptions, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> + Send + Sync + 'static,
             Self: 'async_trait { ... }
    fn blocking_register_delete_handler<F: for<'a> Fn(&'a Self, &'a Self::DeleteOptions, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> + Send + Sync + 'static>(
        priority: ListenerPriority,
        callback: F,
    ) { ... }
    fn run_delete_handlers<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        options: &'life1 Self::DeleteOptions,
        state: &'life2 State,
        transaction: &'life3 mut Transaction<'life4, Postgres>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait { ... }
}

Required Associated Types§

Required Methods§

Source

fn get_delete_handlers() -> &'static LazyLock<DeleteListenerList<Self>>

Source

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 State, options: Self::DeleteOptions, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn register_delete_handler<'async_trait, F>( priority: ListenerPriority, callback: F, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where F: 'async_trait + for<'a> Fn(&'a Self, &'a Self::DeleteOptions, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> + Send + Sync + 'static, Self: 'async_trait,

Source

fn blocking_register_delete_handler<F: for<'a> Fn(&'a Self, &'a Self::DeleteOptions, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> + Send + Sync + 'static>( priority: ListenerPriority, callback: F, )

§Warning

This method will block the current thread if the lock is not available

Source

fn run_delete_handlers<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, options: &'life1 Self::DeleteOptions, state: &'life2 State, transaction: &'life3 mut Transaction<'life4, Postgres>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

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§

Source§

impl DeletableModel for BackupConfiguration

Source§

impl DeletableModel for DatabaseHost

Source§

impl DeletableModel for EggRepository

Source§

impl DeletableModel for EggRepositoryEgg

Source§

impl DeletableModel for Location

Source§

impl DeletableModel for LocationDatabaseHost

Source§

impl DeletableModel for Mount

Source§

impl DeletableModel for Nest

Source§

impl DeletableModel for NestEgg

Source§

impl DeletableModel for NestEggMount

Source§

impl DeletableModel for NestEggVariable

Source§

impl DeletableModel for Node

Source§

impl DeletableModel for NodeMount

Source§

impl DeletableModel for OAuthProvider

Source§

impl DeletableModel for Role

Source§

impl DeletableModel for Server

Source§

impl DeletableModel for ServerAllocation

Source§

impl DeletableModel for ServerBackup

Source§

impl DeletableModel for ServerDatabase

Source§

impl DeletableModel for ServerMount

Source§

impl DeletableModel for ServerSchedule

Source§

impl DeletableModel for ServerScheduleStep

Source§

impl DeletableModel for ServerSubuser

Source§

impl DeletableModel for User

Source§

impl DeletableModel for UserApiKey

Source§

impl DeletableModel for UserCommandSnippet

Source§

impl DeletableModel for UserSecurityKey

Source§

impl DeletableModel for UserServerGroup

Source§

impl DeletableModel for UserSession

Source§

impl DeletableModel for UserSshKey