Enum trust_dns_client::rr::rdata::svcb::SvcParamKey
source · pub enum SvcParamKey {
Mandatory,
Alpn,
NoDefaultAlpn,
Port,
Ipv4Hint,
EchConfig,
Ipv6Hint,
Key(u16),
Key65535,
Unknown(u16),
}
Expand description
14.3.2. Initial contents
The "Service Binding (SVCB) Parameter Registry" shall initially be
populated with the registrations below:
+=============+=================+======================+===========+
| Number | Name | Meaning | Reference |
+=============+=================+======================+===========+
| 0 | mandatory | Mandatory keys in | (This |
| | | this RR | document) |
+-------------+-----------------+----------------------+-----------+
| 1 | alpn | Additional supported | (This |
| | | protocols | document) |
+-------------+-----------------+----------------------+-----------+
| 2 | no-default-alpn | No support for | (This |
| | | default protocol | document) |
+-------------+-----------------+----------------------+-----------+
| 3 | port | Port for alternative | (This |
| | | endpoint | document) |
+-------------+-----------------+----------------------+-----------+
| 4 | ipv4hint | IPv4 address hints | (This |
| | | | document) |
+-------------+-----------------+----------------------+-----------+
| 5 | echconfig | Encrypted | (This |
| | | ClientHello info | document) |
+-------------+-----------------+----------------------+-----------+
| 6 | ipv6hint | IPv6 address hints | (This |
| | | | document) |
+-------------+-----------------+----------------------+-----------+
| 65280-65534 | keyNNNNN | Private Use | (This |
| | | | document) |
+-------------+-----------------+----------------------+-----------+
| 65535 | key65535 | Reserved ("Invalid | (This |
| | | key") | document) |
+-------------+-----------------+----------------------+-----------+
parsing done via:
* a 2 octet field containing the SvcParamKey as an integer in
network byte order. (See Section 14.3.2 for the defined values.)
Variants§
Mandatory
Mandatory keys in this RR
Alpn
Additional supported protocols
NoDefaultAlpn
No support for default protocol
Port
Port for alternative endpoint
Ipv4Hint
IPv4 address hints
EchConfig
Encrypted ClientHello info
Ipv6Hint
IPv6 address hints
Key(u16)
Private Use
Key65535
Reserved (“Invalid key”)
Unknown(u16)
Unknown
Trait Implementations§
source§impl<'r> BinDecodable<'r> for SvcParamKey
impl<'r> BinDecodable<'r> for SvcParamKey
source§fn read(decoder: &mut BinDecoder<'r>) -> Result<SvcParamKey, ProtoError>
fn read(decoder: &mut BinDecoder<'r>) -> Result<SvcParamKey, ProtoError>
Read the type from the stream
source§fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Returns the object in binary form
source§impl BinEncodable for SvcParamKey
impl BinEncodable for SvcParamKey
source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Write the type to the stream
source§impl Clone for SvcParamKey
impl Clone for SvcParamKey
source§fn clone(&self) -> SvcParamKey
fn clone(&self) -> SvcParamKey
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 SvcParamKey
impl Debug for SvcParamKey
source§impl Display for SvcParamKey
impl Display for SvcParamKey
source§impl From<u16> for SvcParamKey
impl From<u16> for SvcParamKey
source§fn from(val: u16) -> SvcParamKey
fn from(val: u16) -> SvcParamKey
Converts to this type from the input type.
source§impl FromStr for SvcParamKey
impl FromStr for SvcParamKey
§type Err = ProtoError
type Err = ProtoError
The associated error which can be returned from parsing.
source§fn from_str(s: &str) -> Result<SvcParamKey, <SvcParamKey as FromStr>::Err>
fn from_str(s: &str) -> Result<SvcParamKey, <SvcParamKey as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moresource§impl Hash for SvcParamKey
impl Hash for SvcParamKey
source§impl Ord for SvcParamKey
impl Ord for SvcParamKey
source§fn cmp(&self, other: &SvcParamKey) -> Ordering
fn cmp(&self, other: &SvcParamKey) -> 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 SvcParamKey
impl PartialEq for SvcParamKey
source§fn eq(&self, other: &SvcParamKey) -> bool
fn eq(&self, other: &SvcParamKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SvcParamKey
impl PartialOrd for SvcParamKey
source§fn partial_cmp(&self, other: &SvcParamKey) -> Option<Ordering>
fn partial_cmp(&self, other: &SvcParamKey) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SvcParamKey
impl Eq for SvcParamKey
impl StructuralEq for SvcParamKey
impl StructuralPartialEq for SvcParamKey
Auto Trait Implementations§
impl RefUnwindSafe for SvcParamKey
impl Send for SvcParamKey
impl Sync for SvcParamKey
impl Unpin for SvcParamKey
impl UnwindSafe for SvcParamKey
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.