MCPcopy Create free account
hub / github.com/dfinity/orbit / insert

Method insert

core/station/impl/src/repositories/notification.rs:63–71  ·  view source on GitHub ↗
(&self, key: NotificationKey, value: Notification)

Source from the content-addressed store, hash-verified

61
62impl 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| {

Callers 3

add_entry_indexesMethod · 0.45
perform_crudFunction · 0.45
find_by_user_idFunction · 0.45

Calls 1

save_entry_indexesMethod · 0.45

Tested by 2

perform_crudFunction · 0.36
find_by_user_idFunction · 0.36