restmail_client

Function find_email

Source
pub fn find_email<F>(
    email: &str,
    predicate: F,
    max_tries: u8,
) -> Result<Value, RestmailClientError>
where F: Fn(&Value) -> bool,
Expand description

For a given restmail email, find the first email that satisfies the given predicate. If no email is found, this function sleeps for a few seconds then tries again, up to max_tries times.