Skip to main content

handle_trimable_events

Function handle_trimable_events 

Source
pub async fn handle_trimable_events<F, R, E>(
    db: Database,
    tracker: DynEventLogTrimableTracker,
    log_event_added: Receiver<()>,
    call_fn: F,
) -> Result<(), EventHandlerError<E>>
where F: Fn(&mut DatabaseTransaction<'_, NonCommittable>, EventLogEntry) -> R, R: Future<Output = Result<(), E>>, E: Error + 'static,
Expand description

Like handle_events, for the trimable part of the log: entries are handed to call_fn and the tracker’s position drives when they can be trimmed.