Enum trust_dns_proto::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>) -> ProtoResult<Self>
fn read(decoder: &mut BinDecoder<'r>) -> ProtoResult<Self>
Read the type from the stream
source§fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
Returns the object in binary form
source§impl BinEncodable for SvcParamKey
impl BinEncodable for SvcParamKey
source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
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<'de> Deserialize<'de> for SvcParamKey
impl<'de> Deserialize<'de> for SvcParamKey
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 Display for SvcParamKey
impl Display for SvcParamKey
source§impl From<SvcParamKey> for u16
impl From<SvcParamKey> for u16
source§fn from(val: SvcParamKey) -> Self
fn from(val: SvcParamKey) -> Self
Converts to this type from the input type.
source§impl From<u16> for SvcParamKey
impl From<u16> for SvcParamKey
source§impl FromStr for SvcParamKey
impl FromStr for SvcParamKey
source§impl Hash for SvcParamKey
impl Hash for SvcParamKey
source§impl Ord for SvcParamKey
impl Ord for SvcParamKey
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
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 moresource§impl Serialize for SvcParamKey
impl Serialize for SvcParamKey
impl 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> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.