pub struct EndpointPortConfig {
pub port: PortBinding,
pub ip_mode: IpMode,
pub socket_options: SocketOptions,
pub retry_behavior: PortRetryBehavior,
}
Expand description
Configuration for endpoint port binding
This configuration allows flexible port binding strategies, dual-stack support, and automatic port discovery.
§Examples
§OS-assigned port (recommended)
use ant_quic::config::EndpointPortConfig;
let config = EndpointPortConfig::default();
§Explicit port
use ant_quic::config::{EndpointPortConfig, PortBinding};
let config = EndpointPortConfig {
port: PortBinding::Explicit(9000),
..Default::default()
};
§Dual-stack with separate ports
use ant_quic::config::{EndpointPortConfig, IpMode, PortBinding};
let config = EndpointPortConfig {
ip_mode: IpMode::DualStackSeparate {
ipv4_port: PortBinding::Explicit(9000),
ipv6_port: PortBinding::Explicit(9001),
},
..Default::default()
};
Fields§
§port: PortBinding
Port binding configuration
ip_mode: IpMode
IP stack mode
socket_options: SocketOptions
Socket options
retry_behavior: PortRetryBehavior
Retry behavior on port conflicts
Trait Implementations§
Source§impl Clone for EndpointPortConfig
impl Clone for EndpointPortConfig
Source§fn clone(&self) -> EndpointPortConfig
fn clone(&self) -> EndpointPortConfig
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 EndpointPortConfig
impl Debug for EndpointPortConfig
Auto Trait Implementations§
impl Freeze for EndpointPortConfig
impl RefUnwindSafe for EndpointPortConfig
impl Send for EndpointPortConfig
impl Sync for EndpointPortConfig
impl Unpin for EndpointPortConfig
impl UnwindSafe for EndpointPortConfig
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