Rindle docs and package mapSkip to main content

refresh_generation_bound

Function refresh_generation_bound 

pub fn refresh_generation_bound<T, E>(
    current: &mut Result<T, E>,
    seen_generation: &mut usize,
    generation: usize,
    open: impl FnOnce() -> Result<T, E>,
) -> bool
Expand description

Replace a generation-bound resource only after its successor opens successfully. Failed refreshes retain a healthy predecessor and stay retryable.