mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 16:32:29 +00:00
Remove RwLock around stores, locking shall be the responsibility of the store implementation
This commit is contained in:
@@ -10,19 +10,19 @@ pub trait AddressbookStore: Send + Sync + 'static {
|
||||
async fn get_addressbooks(&self, principal: &str) -> Result<Vec<Addressbook>, Error>;
|
||||
|
||||
async fn update_addressbook(
|
||||
&mut self,
|
||||
&self,
|
||||
principal: String,
|
||||
id: String,
|
||||
addressbook: Addressbook,
|
||||
) -> Result<(), Error>;
|
||||
async fn insert_addressbook(&mut self, addressbook: Addressbook) -> Result<(), Error>;
|
||||
async fn insert_addressbook(&self, addressbook: Addressbook) -> Result<(), Error>;
|
||||
async fn delete_addressbook(
|
||||
&mut self,
|
||||
&self,
|
||||
principal: &str,
|
||||
name: &str,
|
||||
use_trashbin: bool,
|
||||
) -> Result<(), Error>;
|
||||
async fn restore_addressbook(&mut self, principal: &str, name: &str) -> Result<(), Error>;
|
||||
async fn restore_addressbook(&self, principal: &str, name: &str) -> Result<(), Error>;
|
||||
|
||||
async fn sync_changes(
|
||||
&self,
|
||||
@@ -43,20 +43,21 @@ pub trait AddressbookStore: Send + Sync + 'static {
|
||||
object_id: &str,
|
||||
) -> Result<AddressObject, Error>;
|
||||
async fn put_object(
|
||||
&mut self,
|
||||
&self,
|
||||
principal: String,
|
||||
addressbook_id: String,
|
||||
object: AddressObject,
|
||||
overwrite: bool,
|
||||
) -> Result<(), Error>;
|
||||
async fn delete_object(
|
||||
&mut self,
|
||||
&self,
|
||||
principal: &str,
|
||||
addressbook_id: &str,
|
||||
object_id: &str,
|
||||
use_trashbin: bool,
|
||||
) -> Result<(), Error>;
|
||||
async fn restore_object(
|
||||
&mut self,
|
||||
&self,
|
||||
principal: &str,
|
||||
addressbook_id: &str,
|
||||
object_id: &str,
|
||||
|
||||
Reference in New Issue
Block a user