pub async fn handle_events<F, R, K>(
db: Database,
pos_key: &K,
log_event_added: Receiver<()>,
call_fn: F,
) -> Result<()>where
K: DatabaseKey + DatabaseRecord + MaybeSend + MaybeSync + DatabaseRecord<Value = EventLogId>,
F: Fn(&mut DatabaseTransaction<'_, NonCommittable>, EventLogEntry) -> R,
R: Future<Output = Result<()>>,