pub struct TransportConfig {Show 13 fields
pub bind: Option<SocketAddr>,
pub server_name: Option<String>,
pub tls_mode: Option<TlsMode>,
pub ca_cert: Option<PathBuf>,
pub client_cert: Option<PathBuf>,
pub client_key: Option<PathBuf>,
pub zero_rtt: Option<bool>,
pub alpn_protocols: Option<Vec<Vec<u8>>>,
pub congestion: Option<Congestion>,
pub cwnd_init: Option<u64>,
pub idle_timeout: Option<u64>,
pub keep_alive: Option<u64>,
pub max_streams: Option<u64>,
}Fields§
§bind: Option<SocketAddr>The address to bind for transport
server_name: Option<String>Name of the server to connect (derived from server if not provided)
tls_mode: Option<TlsMode>Set the TLS mode for the connection
ca_cert: Option<PathBuf>Path to the Certificate Authority (CA) certificate file
client_cert: Option<PathBuf>Path to the client’s TLS certificate for mTLS
client_key: Option<PathBuf>Path to the client’s TLS private key for mTLS
zero_rtt: Option<bool>Enable 0-RTT for faster connection establishment
alpn_protocols: Option<Vec<Vec<u8>>>Application-Layer protocol negotiation (ALPN) protocols [default: h3]
congestion: Option<Congestion>Congestion control algorithm to use (e.g. bbr, cubic, newreno) [default: bbr]
cwnd_init: Option<u64>Initial congestion window size in bytes
idle_timeout: Option<u64>Maximum idle time (in milliseconds) before closing the connection [default: 30000]
keep_alive: Option<u64>Keep-alive interval (in milliseconds) [default: 8000]
max_streams: Option<u64>Maximum number of bidirectional streams that can be open simultaneously [default: 100]
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§impl<'de> Deserialize<'de> for TransportConfig
impl<'de> Deserialize<'de> for TransportConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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 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