pub struct Config {Show 15 fields
pub host_port: String,
pub omit_sni: bool,
pub connect_to: Option<String>,
pub source_port: u32,
pub verify_peer: bool,
pub idle_timeout: u64,
pub max_data: u64,
pub max_stream_data_bidi_local: u64,
pub max_stream_data_bidi_remote: u64,
pub max_stream_data_uni: u64,
pub max_streams_bidi: u64,
pub max_streams_uni: u64,
pub max_window: u64,
pub max_stream_window: u64,
pub session: Option<Vec<u8>>,
}Expand description
Server details and QUIC connection properties.
Fields§
§host_port: StringA string representing the host and port to connect to using the format
<host>:<port>.
omit_sni: boolIf the SNI should be omitted during the TLS handshake.
connect_to: Option<String>Set a specific IP address to connect to, rather than use DNS resolution.
source_port: u32The source port to use when connecting to a server.
verify_peer: boolWhether to verify the server certificate.
idle_timeout: u64The QUIC idle timeout value in milliseconds.
max_data: u64Flow control limit for the connection in bytes
max_stream_data_bidi_local: u64Flow control limit for locally-initiated bidirectional streams in bytes.
max_stream_data_bidi_remote: u64Flow control limit for remotely-initiated bidirectional streams in bytes.
max_stream_data_uni: u64Flow control limit for unidirectional streams in bytes.
max_streams_bidi: u64Maximum count for concurrent remotely-initiated bidirectional streams.
max_streams_uni: u64“Maximum count for concurrent remotely-initiated unidirectional streams”.
max_window: u64Receiver window limit for the connection in bytes.
max_stream_window: u64Receiver window limit for a stream in bytes.
session: Option<Vec<u8>>Set the session to attempt resumption.
Implementations§
Source§impl Config
impl Config
pub fn with_host_port(self, host_port: String) -> Self
pub fn omit_sni(self) -> Self
pub fn with_connect_to(self, connect_to: String) -> Self
pub fn with_source_port(self, port: u32) -> Self
pub fn verify_peer(self, verify_peer: bool) -> Self
pub fn with_idle_timeout(self, idle_timeout: u64) -> Self
pub fn with_max_data(self, max_data: u64) -> Self
pub fn with_max_stream_data_bidi_local( self, max_stream_data_bidi_local: u64, ) -> Self
pub fn with_max_stream_data_bidi_remote( self, max_stream_data_bidi_remote: u64, ) -> Self
pub fn with_max_stream_data_uni(self, max_stream_data_uni: u64) -> Self
pub fn with_max_streams_bidi(self, max_streams_bidi: u64) -> Self
pub fn with_max_streams_uni(self, max_streams_uni: u64) -> Self
pub fn with_max_window(self, max_window: u64) -> Self
pub fn with_max_stream_window(self, max_stream_window: u64) -> Self
pub fn build(self) -> Result<Self, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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> 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 more