pub async fn register_action(
        realm: Arc<Realm>,
        model: Arc<Model>,
        action: Action,
    ) -> Notification {
        let mut actions = realm.actions.lock().await;
        let (nf, needs_handle) = actions.register(action.clone());
        if needs_handle {
            action.handle(model, realm.clone());
        }
        nf
    }
/// Register an action on a realm.
Register an action on a realm.
Register an action on a realm .
pub async fn register_action(
        realm: Arc<Realm>,
        model: Arc<Model>,
        action: Action,
    ) -> Notification {
        let mut actions = realm.actions.lock().await;
        let (nf, needs_handle) = actions.register(action.clone());
        if needs_handle {
            action.handle(model, realm.clone());
        }
        nf
    }
pub async fn register_action ( realm : Arc < Realm > , model : Arc < Model > , action : Action , ) -> Notification { let mut actions = realm . actions . lock ( ) . await ; let ( nf , needs_handle ) = actions . register ( action . clone ( ) ) ; if needs_handle { action . handle ( model , realm . clone ( ) ) ; } nf }
Register an action on a realm.
Register an action on a realm .
realm
Arc<Realm>
model
Arc<Model>
action
Action