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:
Duration
Connection timeout.
RequestTimeout:
Duration
Request timeout.
MaximumRetries:
u32
Maximum number of retries.
RetryDelay:
Duration
Delay between retries.
KeepaliveEnabled:
bool
Whether keepalive is enabled.
KeepaliveInterval:
Duration
Keepalive interval.
Implementations§
Source§
impl
TransportConfig
impl TransportConfig
Source
pub fn
WithConnectionTimeout(self, Timeout:
Duration) -> Self
pub fn WithConnectionTimeout(self, Timeout: Duration) -> Self
Sets the connection timeout.
Source
pub fn
WithRequestTimeout(self, Timeout:
Duration) -> Self
pub fn WithRequestTimeout(self, Timeout: Duration) -> Self
Sets the request timeout.
Source
pub fn
WithMaximumRetries(self, MaximumRetries:
u32) -> Self
pub fn WithMaximumRetries(self, MaximumRetries: u32) -> Self
Sets the maximum number of retries.
Source
pub fn
WithRetryDelay(self, Delay:
Duration) -> Self
pub fn WithRetryDelay(self, Delay: Duration) -> Self
Sets the retry delay.
Source
pub 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 more
Source§
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 T
where T: ?Sized,
impl<T>
BorrowMut<T> for T
where 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 T
where T:
Clone,
impl<T>
CloneToUninit
for T
where 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 more
Source§
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 more
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