pub enum BindScope {
AnyAddress,
Loopback,
SpecificInterface(String),
SpecificAddress(IpAddr),
}Expand description
Where a listening socket is bound.
A Linux [::]:22 listener accepts IPv4 connections as well unless the
net.ipv6.bindv6only sysctl is set — BindScope::AnyAddress is the
right variant in that dual-stack case.
Variants§
AnyAddress
Loopback
SpecificInterface(String)
%iface suffix on the bind address (common with link-local IPv6).
SpecificAddress(IpAddr)
A specific non-loopback address (e.g. 127.0.0.53 for the systemd
stub, or a LAN IP when the process bound to one).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BindScope
impl<'de> Deserialize<'de> for BindScope
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
impl Eq for BindScope
impl StructuralPartialEq for BindScope
Auto Trait Implementations§
impl Freeze for BindScope
impl RefUnwindSafe for BindScope
impl Send for BindScope
impl Sync for BindScope
impl Unpin for BindScope
impl UnsafeUnpin for BindScope
impl UnwindSafe for BindScope
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