Struct tonic_types::RetryInfo
source · pub struct RetryInfo {
pub retry_delay: Option<Duration>,
}
Expand description
Used to encode/decode the RetryInfo
standard error message described in
error_details.proto. Describes when the clients can retry a failed
request.
Note: When obtained from decoding RetryInfo
messages, negative
retry_delay
’s become 0.
Fields§
§retry_delay: Option<Duration>
Informs the amout of time that clients should wait before retrying.
Implementations§
source§impl RetryInfo
impl RetryInfo
sourcepub const TYPE_URL: &'static str = "type.googleapis.com/google.rpc.RetryInfo"
pub const TYPE_URL: &'static str = "type.googleapis.com/google.rpc.RetryInfo"
Type URL of the RetryInfo
standard error message type.
sourcepub const MAX_RETRY_DELAY: Duration = _
pub const MAX_RETRY_DELAY: Duration = _
Should not exceed prost_types::Duration
range. Limited to
approximately 10,000 years.
sourcepub fn new(retry_delay: Option<Duration>) -> Self
pub fn new(retry_delay: Option<Duration>) -> Self
Creates a new RetryInfo
struct. If retry_delay
exceeds
RetryInfo::MAX_RETRY_DELAY
, RetryInfo::MAX_RETRY_DELAY
will
be used instead.
Trait Implementations§
source§impl From<RetryInfo> for ErrorDetail
impl From<RetryInfo> for ErrorDetail
Auto Trait Implementations§
impl RefUnwindSafe for RetryInfo
impl Send for RetryInfo
impl Sync for RetryInfo
impl Unpin for RetryInfo
impl UnwindSafe for RetryInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request