#[repr(i32)]pub enum SocketProtocol {
Udp = 1,
Tcp = 2,
Dot = 3,
Doh = 4,
DnsCryptUdp = 5,
DnsCryptTcp = 6,
}Expand description
SocketProtocol: the protocol used to transport a DNS message.
Variants§
Udp = 1
DNS over UDP transport (RFC 1035 section 4.2.1)
Tcp = 2
DNS over TCP transport (RFC 1035 section 4.2.2)
Dot = 3
DNS over TLS (RFC 7858)
Doh = 4
DNS over HTTPS (RFC 8484)
DnsCryptUdp = 5
DNSCrypt over UDP (https://dnscrypt.info/protocol)
DnsCryptTcp = 6
DNSCrypt over TCP (https://dnscrypt.info/protocol)
Implementations§
Source§impl SocketProtocol
impl SocketProtocol
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for SocketProtocol
impl Clone for SocketProtocol
Source§fn clone(&self) -> SocketProtocol
fn clone(&self) -> SocketProtocol
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 SocketProtocol
impl Debug for SocketProtocol
Source§impl Default for SocketProtocol
impl Default for SocketProtocol
Source§fn default() -> SocketProtocol
fn default() -> SocketProtocol
Returns the “default value” for a type. Read more
Source§impl From<SocketProtocol> for i32
impl From<SocketProtocol> for i32
Source§fn from(value: SocketProtocol) -> i32
fn from(value: SocketProtocol) -> i32
Converts to this type from the input type.
Source§impl Hash for SocketProtocol
impl Hash for SocketProtocol
Source§impl Ord for SocketProtocol
impl Ord for SocketProtocol
Source§fn cmp(&self, other: &SocketProtocol) -> Ordering
fn cmp(&self, other: &SocketProtocol) -> 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 SocketProtocol
impl PartialEq for SocketProtocol
Source§impl PartialOrd for SocketProtocol
impl PartialOrd for SocketProtocol
impl Copy for SocketProtocol
impl Eq for SocketProtocol
impl StructuralPartialEq for SocketProtocol
Auto Trait Implementations§
impl Freeze for SocketProtocol
impl RefUnwindSafe for SocketProtocol
impl Send for SocketProtocol
impl Sync for SocketProtocol
impl Unpin for SocketProtocol
impl UnwindSafe for SocketProtocol
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
Source§fn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.