pub struct ProtocolConfig {
pub version: String,
pub mountain_endpoint: String,
pub connection_timeout_ms: u64,
pub heartbeat_interval_sec: u64,
pub message_buffer_size: usize,
pub enable_tls: bool,
pub enable_compression: bool,
}
Expand description
Protocol configuration
Fields§
§version:
String
Protocol version
mountain_endpoint:
String
Mountain endpoint
connection_timeout_ms:
u64
Connection timeout
heartbeat_interval_sec:
u64
Heartbeat interval
message_buffer_size:
usize
Message buffer size
enable_tls:
bool
Enable TLS
enable_compression:
bool
Enable compression
Implementations§
Source§
impl
ProtocolConfig
impl ProtocolConfig
Source
pub fn
with_mountain_endpoint(self, endpoint:
String) -> Self
pub fn with_mountain_endpoint(self, endpoint: String) -> Self
Set mountain endpoint
Source
pub fn
with_connection_timeout(self, timeout_ms:
u64) -> Self
pub fn with_connection_timeout(self, timeout_ms: u64) -> Self
Set connection timeout
Source
pub fn
with_heartbeat_interval(self, interval_sec:
u64) -> Self
pub fn with_heartbeat_interval(self, interval_sec: u64) -> Self
Set heartbeat interval
Source
pub fn
with_compression(self, enable:
bool) -> Self
pub fn with_compression(self, enable: bool) -> Self
Enable or disable compression
Trait Implementations§
Source§
impl
Clone
for
ProtocolConfig
impl Clone for ProtocolConfig
Source§
fn
clone(&self) ->
ProtocolConfig
fn clone(&self) -> ProtocolConfig
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
ProtocolConfig
impl Debug for ProtocolConfig
Auto Trait Implementations§
impl Freeze for ProtocolConfig
impl RefUnwindSafe for ProtocolConfig
impl Send for ProtocolConfig
impl Sync for ProtocolConfig
impl Unpin for ProtocolConfig
impl UnsafeUnpin for ProtocolConfig
impl UnwindSafe for ProtocolConfig
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