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: StringProtocol version
mountain_endpoint: StringMountain endpoint
connection_timeout_ms: u64Connection timeout
heartbeat_interval_sec: u64Heartbeat interval
message_buffer_size: usizeMessage buffer size
enable_tls: boolEnable TLS
enable_compression: boolEnable compression
Implementations§
Source§impl ProtocolConfig
impl ProtocolConfig
Sourcepub fn with_mountain_endpoint(self, endpoint: String) -> Self
pub fn with_mountain_endpoint(self, endpoint: String) -> Self
Set mountain endpoint
Sourcepub fn with_connection_timeout(self, timeout_ms: u64) -> Self
pub fn with_connection_timeout(self, timeout_ms: u64) -> Self
Set connection timeout
Sourcepub fn with_heartbeat_interval(self, interval_sec: u64) -> Self
pub fn with_heartbeat_interval(self, interval_sec: u64) -> Self
Set heartbeat interval
Sourcepub 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 moreSource§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 UnwindSafe for ProtocolConfig
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