pub struct SocketFlags {
pub ipv6_only: bool,
pub udp_reuse_port: bool,
}
Expand description
UDP/TCP socket flags.
Fields§
§ipv6_only: bool
Disable dual-stack support so only IPv6 is used (only if ip is IPv6). Defaults to false.
udp_reuse_port: bool
Make different transports bind to the same ip and port (only for UDP). Useful for multicast scenarios with plain transport. Use with caution. Defaults to false.
Trait Implementations§
Source§impl Clone for SocketFlags
impl Clone for SocketFlags
Source§fn clone(&self) -> SocketFlags
fn clone(&self) -> SocketFlags
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 SocketFlags
impl Debug for SocketFlags
Source§impl Default for SocketFlags
impl Default for SocketFlags
Source§fn default() -> SocketFlags
fn default() -> SocketFlags
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SocketFlags
impl<'de> Deserialize<'de> for SocketFlags
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for SocketFlags
impl Hash for SocketFlags
Source§impl Ord for SocketFlags
impl Ord for SocketFlags
Source§fn cmp(&self, other: &SocketFlags) -> Ordering
fn cmp(&self, other: &SocketFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SocketFlags
impl PartialEq for SocketFlags
Source§impl PartialOrd for SocketFlags
impl PartialOrd for SocketFlags
Source§impl Serialize for SocketFlags
impl Serialize for SocketFlags
impl Copy for SocketFlags
impl Eq for SocketFlags
impl StructuralPartialEq for SocketFlags
Auto Trait Implementations§
impl Freeze for SocketFlags
impl RefUnwindSafe for SocketFlags
impl Send for SocketFlags
impl Sync for SocketFlags
impl Unpin for SocketFlags
impl UnwindSafe for SocketFlags
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