pub struct UdpConfig {
pub bind_addr: Option<SocketAddr>,
pub reuseaddr: Option<bool>,
pub broadcast: Option<bool>,
pub ttl: Option<u32>,
pub bind_device: Option<String>,
}Expand description
Configuration options for a UDP socket.
Fields§
§bind_addr: Option<SocketAddr>Address to bind. If None, the operating system chooses the address.
reuseaddr: Option<bool>Enable address reuse (SO_REUSEADDR).
broadcast: Option<bool>Allow broadcast (SO_BROADCAST).
ttl: Option<u32>Time to live value.
bind_device: Option<String>Bind to a specific interface (Linux only).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UdpConfig
impl RefUnwindSafe for UdpConfig
impl Send for UdpConfig
impl Sync for UdpConfig
impl Unpin for UdpConfig
impl UnwindSafe for UdpConfig
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