fn is_retryable_error(err: &RequestError) -> bool {
    match err {
        RequestError::BadStatus(status) => {
            if status.is_server_error() {
                return true;
            }
        }
        RequestError::Network(err) => {
            if err.is_incomplete_message()
                || err.is_parse()
                || err.is_canceled()
                || err.is_connect()
            {
                return true;
            }
        }
        RequestError::Parse(err) => {
            if let ClientParseError::InvalidBody = err {
                return true;
            }
        }
    }

    false
}
/// Determines if the provided error should trigger a retry or not.
Determines if the provided error should trigger a retry or not.
Determines if the provided error should trigger a retry or not .
fn is_retryable_error(err: &RequestError) -> bool {
    match err {
        RequestError::BadStatus(status) => {
            if status.is_server_error() {
                return true;
            }
        }
        RequestError::Network(err) => {
            if err.is_incomplete_message()
                || err.is_parse()
                || err.is_canceled()
                || err.is_connect()
            {
                return true;
            }
        }
        RequestError::Parse(err) => {
            if let ClientParseError::InvalidBody = err {
                return true;
            }
        }
    }
    false
}
fn is_retryable_error ( err : & RequestError ) -> bool { match err { RequestError :: BadStatus ( status ) => { if status . is_server_error ( ) { return true ; } } RequestError :: Network ( err ) => { if err . is_incomplete_message ( ) || err . is_parse ( ) || err . is_canceled ( ) || err . is_connect ( ) { return true ; } } RequestError :: Parse ( err ) => { if let ClientParseError :: InvalidBody = err { return true ; } } } false }
Determines if the provided error should trigger a retry or not.
Determines if the provided error should trigger a retry or not .
err
&RequestError