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
sourceimpl<'r> BinDecodable<'r> for SvcParamKey
impl<'r> BinDecodable<'r> for SvcParamKey
sourcepub fn read(decoder: &mut BinDecoder<'r>) -> Result<SvcParamKey, ProtoError>
pub fn read(decoder: &mut BinDecoder<'r>) -> Result<SvcParamKey, ProtoError>
Read the type from the stream
sourcefn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Returns the object in binary form
sourceimpl BinEncodable for SvcParamKey
impl BinEncodable for SvcParamKey
sourcepub fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
pub fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Write the type to the stream
sourceimpl Clone for SvcParamKey
impl Clone for SvcParamKey
sourcepub fn clone(&self) -> SvcParamKey
pub fn clone(&self) -> SvcParamKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SvcParamKey
impl Debug for SvcParamKey
sourceimpl Display for SvcParamKey
impl Display for SvcParamKey
sourceimpl From<u16> for SvcParamKey
impl From<u16> for SvcParamKey
sourcepub fn from(val: u16) -> SvcParamKey
pub fn from(val: u16) -> SvcParamKey
Performs the conversion.
sourceimpl FromStr for SvcParamKey
impl FromStr for SvcParamKey
type Err = ProtoError
type Err = ProtoError
The associated error which can be returned from parsing.
sourcepub fn from_str(s: &str) -> Result<SvcParamKey, <SvcParamKey as FromStr>::Err>
pub fn from_str(s: &str) -> Result<SvcParamKey, <SvcParamKey as FromStr>::Err>
Parses a string s
to return a value of this type. Read more
sourceimpl Hash for SvcParamKey
impl Hash for SvcParamKey
sourceimpl Ord for SvcParamKey
impl Ord for SvcParamKey
sourceimpl PartialEq<SvcParamKey> for SvcParamKey
impl PartialEq<SvcParamKey> for SvcParamKey
sourcepub fn eq(&self, other: &SvcParamKey) -> bool
pub fn eq(&self, other: &SvcParamKey) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &SvcParamKey) -> bool
pub fn ne(&self, other: &SvcParamKey) -> bool
This method tests for !=
.
sourceimpl PartialOrd<SvcParamKey> for SvcParamKey
impl PartialOrd<SvcParamKey> for SvcParamKey
sourcepub fn partial_cmp(&self, other: &SvcParamKey) -> Option<Ordering>
pub fn partial_cmp(&self, other: &SvcParamKey) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more