Skip to main content

find_with

Function find_with 

Source
pub fn find_with<T: Transport, M>(
    client: &Client<T>,
    wanted: &Wanted,
    now_s: u64,
    build: impl Fn(&DataFile) -> Result<M, String>,
) -> Result<(Found, M), FindError>
Expand description

As find, with build reading a file instead: the file taken is the first, in find’s order, that build turns into an M, returned with it. build’s refusal of the last file tried is FindError::NoFile’s reason.

§Errors

As find.