fn first_started(
ports: impl Iterator<Item = u16>,
probe: impl Fn(u16) -> bool,
attempt: impl FnMut(u16) -> Result<bool>,
) -> Result<u16>Expand description
Tries each probed-free port in order. A port refused by probe costs no
server start; one that attempt fails on (taken since the probe, or a server
that cannot start at all) moves on to the next.