pub struct TransportConfig {
pub ConnectionTimeout: Duration,
pub RequestTimeout: Duration,
pub MaximumRetries: u32,
pub RetryDelay: Duration,
pub KeepaliveEnabled: bool,
pub KeepaliveInterval: Duration,
}Expand description
Transport configuration.
Fields§
§ConnectionTimeout: DurationConnection timeout.
RequestTimeout: DurationRequest timeout.
MaximumRetries: u32Maximum number of retries.
RetryDelay: DurationDelay between retries.
KeepaliveEnabled: boolWhether keepalive is enabled.
KeepaliveInterval: DurationKeepalive interval.
Implementations§
Source§impl TransportConfig
impl TransportConfig
Sourcepub fn WithConnectionTimeout(self, Timeout: Duration) -> Self
pub fn WithConnectionTimeout(self, Timeout: Duration) -> Self
Sets the connection timeout.
Sourcepub fn WithRequestTimeout(self, Timeout: Duration) -> Self
pub fn WithRequestTimeout(self, Timeout: Duration) -> Self
Sets the request timeout.
Sourcepub fn WithMaximumRetries(self, MaximumRetries: u32) -> Self
pub fn WithMaximumRetries(self, MaximumRetries: u32) -> Self
Sets the maximum number of retries.
Sourcepub fn WithRetryDelay(self, Delay: Duration) -> Self
pub fn WithRetryDelay(self, Delay: Duration) -> Self
Sets the retry delay.
Sourcepub fn WithKeepalive(self, Enabled: bool) -> Self
pub fn WithKeepalive(self, Enabled: bool) -> Self
Enables or disables keepalive.
Trait Implementations§
Source§impl Clone for TransportConfig
impl Clone for TransportConfig
Source§fn clone(&self) -> TransportConfig
fn clone(&self) -> TransportConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransportConfig
impl Debug for TransportConfig
Auto Trait Implementations§
impl Freeze for TransportConfig
impl RefUnwindSafe for TransportConfig
impl Send for TransportConfig
impl Sync for TransportConfig
impl Unpin for TransportConfig
impl UnsafeUnpin for TransportConfig
impl UnwindSafe for TransportConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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