pub struct ChannelOptions {Show 15 fields
pub connect_timeout_secs: Option<u64>,
pub timeout_secs: Option<u64>,
pub max_decoding_message_size: Option<usize>,
pub max_encoding_message_size: Option<usize>,
pub http2_keep_alive_interval_secs: Option<u64>,
pub keep_alive_timeout_secs: Option<u64>,
pub keep_alive_while_idle: Option<bool>,
pub initial_stream_window_size: Option<u32>,
pub initial_connection_window_size: Option<u32>,
pub http2_adaptive_window: Option<bool>,
pub tcp_nodelay: Option<bool>,
pub tcp_keepalive_secs: Option<u64>,
pub buffer_size: Option<usize>,
pub accept_compression: Option<Vec<CompressionEncoding>>,
pub send_compression: Option<CompressionEncoding>,
}Fields§
§connect_timeout_secs: Option<u64>Connect timeout in seconds. Default: 10
timeout_secs: Option<u64>Request timeout in seconds. Default: 30
max_decoding_message_size: Option<usize>Max message size for receiving in bytes. Default: 1GB
max_encoding_message_size: Option<usize>Max message size for sending in bytes. Default: 32MB
http2_keep_alive_interval_secs: Option<u64>HTTP/2 keep-alive interval in seconds. Default: 30
keep_alive_timeout_secs: Option<u64>Keep-alive timeout in seconds. Default: 5
keep_alive_while_idle: Option<bool>Enable keep-alive while idle. Default: true
initial_stream_window_size: Option<u32>Initial stream window size in bytes. Default: 4MB
initial_connection_window_size: Option<u32>Initial connection window size in bytes. Default: 8MB
http2_adaptive_window: Option<bool>Enable HTTP/2 adaptive window. Default: true
tcp_nodelay: Option<bool>Enable TCP no-delay. Default: true
tcp_keepalive_secs: Option<u64>TCP keep-alive interval in seconds. Default: 60
buffer_size: Option<usize>Buffer size in bytes. Default: 64KB
accept_compression: Option<Vec<CompressionEncoding>>Compression encodings to accept from server. Default: [“gzip”, “zstd”]
send_compression: Option<CompressionEncoding>Compression encoding to use when sending. Default: None
Implementations§
Source§impl ChannelOptions
impl ChannelOptions
Sourcepub fn with_zstd_compression(self) -> Self
pub fn with_zstd_compression(self) -> Self
Enable zstd compression for both sending and receiving
Sourcepub fn with_gzip_compression(self) -> Self
pub fn with_gzip_compression(self) -> Self
Enable gzip compression for both sending and receiving
Trait Implementations§
Source§impl Clone for ChannelOptions
impl Clone for ChannelOptions
Source§fn clone(&self) -> ChannelOptions
fn clone(&self) -> ChannelOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChannelOptions
impl Debug for ChannelOptions
Source§impl Default for ChannelOptions
impl Default for ChannelOptions
Source§fn default() -> ChannelOptions
fn default() -> ChannelOptions
Auto Trait Implementations§
impl Freeze for ChannelOptions
impl RefUnwindSafe for ChannelOptions
impl Send for ChannelOptions
impl Sync for ChannelOptions
impl Unpin for ChannelOptions
impl UnsafeUnpin for ChannelOptions
impl UnwindSafe for ChannelOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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>
T in a tonic::RequestSource§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>
T in a tonic::Request