(&self, key: NotificationKey, value: Notification)
| 61 | |
| 62 | impl Repository<NotificationKey, Notification, VirtualMemory<Memory>> for NotificationRepository { |
| 63 | fn insert(&self, key: NotificationKey, value: Notification) -> Option<Notification> { |
| 64 | DB.with(|m| { |
| 65 | let prev = m.borrow_mut().insert(key, value.clone()); |
| 66 | |
| 67 | self.save_entry_indexes(&value, prev.as_ref()); |
| 68 | |
| 69 | prev |
| 70 | }) |
| 71 | } |
| 72 | |
| 73 | fn remove(&self, key: &NotificationKey) -> Option<Notification> { |
| 74 | DB.with(|m| { |