pub fn new(retry_delay: Option<time::Duration>) -> Self {
        let retry_delay = match retry_delay {
            Some(mut delay) => {
                if delay > RetryInfo::MAX_RETRY_DELAY {
                    delay = RetryInfo::MAX_RETRY_DELAY
                }
                Some(delay)
            }
            None => None,
        };

        RetryInfo { retry_delay }
    }
Creates a new [`RetryInfo`] struct. If `retry_delay` exceeds
[`RetryInfo::MAX_RETRY_DELAY`], [`RetryInfo::MAX_RETRY_DELAY`] will
be used instead.
tonic-types/src/richer_error/std_messages/retry_info.rs