Enum tor_proto::stream::IpVersionPreference
source · #[non_exhaustive]
pub enum IpVersionPreference {
Ipv4Only,
Ipv4Preferred,
Ipv6Preferred,
Ipv6Only,
}Expand description
A preference for IPv4 vs IPv6 addresses; usable as a nicer frontend for BeginFlags.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ipv4Only
Only IPv4 is allowed.
Ipv4Preferred
IPv4 and IPv6 are both allowed, and IPv4 is preferred.
Ipv6Preferred
IPv4 and IPv6 are both allowed, and IPv6 is preferred.
Ipv6Only
Only IPv6 is allowed.
Trait Implementations§
source§impl Clone for IpVersionPreference
impl Clone for IpVersionPreference
source§fn clone(&self) -> IpVersionPreference
fn clone(&self) -> IpVersionPreference
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 IpVersionPreference
impl Debug for IpVersionPreference
source§impl Default for IpVersionPreference
impl Default for IpVersionPreference
source§fn default() -> IpVersionPreference
fn default() -> IpVersionPreference
Returns the “default value” for a type. Read more