Struct Config

Source
pub struct Config {
Show 14 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,
}
Expand description

Server details and QUIC connection properties.

Fields§

§host_port: String

A string representing the host and port to connect to using the format <host>:<port>.

§omit_sni: bool

If 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: u32

The source port to use when connecting to a server.

§verify_peer: bool

Whether to verify the server certificate.

§idle_timeout: u64

The QUIC idle timeout value in milliseconds.

§max_data: u64

Flow control limit for the connection in bytes

§max_stream_data_bidi_local: u64

Flow control limit for locally-initiated bidirectional streams in bytes.

§max_stream_data_bidi_remote: u64

Flow control limit for remotely-initiated bidirectional streams in bytes.

§max_stream_data_uni: u64

Flow control limit for unidirectional streams in bytes.

§max_streams_bidi: u64

Maximum count for concurrent remotely-initiated bidirectional streams.

§max_streams_uni: u64

“Maximum count for concurrent remotely-initiated unidirectional streams”.

§max_window: u64

Receiver window limit for the connection in bytes.

§max_stream_window: u64

Receiver window limit for a stream in bytes.

Implementations§

Source§

impl Config

Source

pub fn new() -> Self

Construct a new config object with default values.

Source

pub fn with_host_port(self, host_port: String) -> Self

Source

pub fn omit_sni(self) -> Self

Source

pub fn with_connect_to(self, connect_to: String) -> Self

Source

pub fn with_source_port(self, port: u32) -> Self

Source

pub fn verify_peer(self, verify_peer: bool) -> Self

Source

pub fn with_idle_timeout(self, idle_timeout: u64) -> Self

Source

pub fn with_max_data(self, max_data: u64) -> Self

Source

pub fn with_max_stream_data_bidi_local( self, max_stream_data_bidi_local: u64, ) -> Self

Source

pub fn with_max_stream_data_bidi_remote( self, max_stream_data_bidi_remote: u64, ) -> Self

Source

pub fn with_max_stream_data_uni(self, max_stream_data_uni: u64) -> Self

Source

pub fn with_max_streams_bidi(self, max_streams_bidi: u64) -> Self

Source

pub fn with_max_streams_uni(self, max_streams_uni: u64) -> Self

Source

pub fn with_max_window(self, max_window: u64) -> Self

Source

pub fn with_max_stream_window(self, max_stream_window: u64) -> Self

Source

pub fn build(self) -> Result<Self, Error>

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T