pub struct TransportConfig {
pub transport_type: TransportType,
pub connect_timeout: Duration,
pub read_timeout: Option<Duration>,
pub write_timeout: Option<Duration>,
pub keep_alive: Option<Duration>,
pub max_connections: Option<usize>,
pub compression: bool,
pub compression_algorithm: Option<String>,
pub limits: LimitsConfig,
pub timeouts: TimeoutConfig,
pub tls: TlsConfig,
pub custom: HashMap<String, Value>,
}Expand description
Configuration for a transport instance.
Fields§
§transport_type: TransportTypeThe type of the transport.
connect_timeout: DurationThe maximum time to wait for a connection to be established.
read_timeout: Option<Duration>The maximum time to wait for a read operation to complete.
write_timeout: Option<Duration>The maximum time to wait for a write operation to complete.
keep_alive: Option<Duration>The interval for sending keep-alive messages to maintain the connection.
max_connections: Option<usize>The maximum number of concurrent connections allowed.
compression: boolWhether to enable message compression.
compression_algorithm: Option<String>The preferred compression algorithm to use.
limits: LimitsConfigSize limits for requests and responses.
timeouts: TimeoutConfigTimeout configuration for operations.
tls: TlsConfigTLS/HTTPS configuration.
custom: HashMap<String, Value>A map for any other custom configuration.
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
Source§impl Default for TransportConfig
impl Default for TransportConfig
Source§fn default() -> TransportConfig
fn default() -> TransportConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TransportConfig
impl<'de> Deserialize<'de> for TransportConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransportConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransportConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TransportConfig
impl Serialize for TransportConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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