I m trying to use tauri command with make handler. It is generic function that process the aggregate for events and commands. It is coming from OSS project https://github.com/kunjee17/cosmo-store-rs/blob/master/cosmo_store_util/src/aggregate.rs#L16 . It works without any issue for test cases as well as web project where I m using actix. But when I m trying to call via tauri command it is giving issue of send + sync.
I m not getting where I should be looking and what changes I needed to make to make it work with tauri command. Here is the error message
`dyn Aggregate<std::option::Option<Patient>, PatientCommand, PatientEvent>` cannot be shared between threads safely
the trait `Sync` is not implemented for `dyn Aggregate<std::option::Option<Patient>, PatientCommand, PatientEvent>`
required for `&dyn Aggregate<std::option::Option<Patient>, PatientCommand, PatientEvent>` to implement `Send`
required because it captures the following types: `tauri::State<'_, AppState>`, `EventStoreSQLXSqlite`, `Uuid`, `std::string::String`, `PatientCommand`, `std::string::String`, `EventsReadRange<cosmo_store::common::i64_event_version::EventVersion>`, `PatientAggregate`, `impl std::future::Future<Output = Result<Vec<EventRead<PatientEvent, PatientEvent, cosmo_store::common::i64_event_version::EventVersion>>, anyhow::Error>>
Any pointers to even debug this code would be really helpful.