pub struct PeerOptions {Show 22 fields
pub bind_to: Option<BindTo>,
pub connection_timeout: Option<Duration>,
pub total_connection_timeout: Option<Duration>,
pub read_timeout: Option<Duration>,
pub idle_timeout: Option<Duration>,
pub write_timeout: Option<Duration>,
pub verify_cert: bool,
pub verify_hostname: bool,
pub alternative_cn: Option<String>,
pub alpn: ALPN,
pub ca: Option<Arc<CaType>>,
pub tcp_keepalive: Option<TcpKeepalive>,
pub tcp_recv_buf: Option<usize>,
pub dscp: Option<u8>,
pub h2_ping_interval: Option<Duration>,
pub max_h2_streams: usize,
pub extra_proxy_headers: BTreeMap<String, Vec<u8>>,
pub curves: Option<&'static str>,
pub second_keyshare: bool,
pub tcp_fast_open: bool,
pub tracer: Option<Tracer>,
pub custom_l4: Option<Arc<dyn L4Connect + Send + Sync>>,
}
Expand description
The preferences to connect to a remote server
See Peer
for the meaning of the fields
Fields§
§bind_to: Option<BindTo>
§connection_timeout: Option<Duration>
§total_connection_timeout: Option<Duration>
§read_timeout: Option<Duration>
§idle_timeout: Option<Duration>
§write_timeout: Option<Duration>
§verify_cert: bool
§verify_hostname: bool
§alternative_cn: Option<String>
§alpn: ALPN
§ca: Option<Arc<CaType>>
§tcp_keepalive: Option<TcpKeepalive>
§tcp_recv_buf: Option<usize>
§dscp: Option<u8>
§h2_ping_interval: Option<Duration>
§max_h2_streams: usize
§extra_proxy_headers: BTreeMap<String, Vec<u8>>
§curves: Option<&'static str>
§tcp_fast_open: bool
§tracer: Option<Tracer>
§custom_l4: Option<Arc<dyn L4Connect + Send + Sync>>
Implementations§
Source§impl PeerOptions
impl PeerOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new PeerOptions
Sourcepub fn set_http_version(&mut self, max: u8, min: u8)
pub fn set_http_version(&mut self, max: u8, min: u8)
Set the ALPN according to the max
and min
constrains.
Trait Implementations§
Source§impl Clone for PeerOptions
impl Clone for PeerOptions
Source§fn clone(&self) -> PeerOptions
fn clone(&self) -> PeerOptions
Returns a copy 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 PeerOptions
impl Debug for PeerOptions
Auto Trait Implementations§
impl Freeze for PeerOptions
impl !RefUnwindSafe for PeerOptions
impl Send for PeerOptions
impl Sync for PeerOptions
impl Unpin for PeerOptions
impl !UnwindSafe for PeerOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)