add_item now returns a Result
This commit is contained in:
parent
fd0568dbcc
commit
9355629136
5 changed files with 36 additions and 23 deletions
|
@ -42,7 +42,7 @@ pub trait PartialCalendar {
|
|||
async fn get_item_by_id<'a>(&'a self, id: &ItemId) -> Option<&'a Item>;
|
||||
|
||||
/// Add an item into this calendar
|
||||
async fn add_item(&mut self, item: Item);
|
||||
async fn add_item(&mut self, item: Item) -> Result<(), Box<dyn Error>>;
|
||||
|
||||
/// Remove an item from this calendar
|
||||
async fn delete_item(&mut self, item_id: &ItemId) -> Result<(), Box<dyn Error>>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue