#[repr(transparent)]pub struct Mandatory(pub Vec<SvcParamKey>);
Expand description
RFC 9460 SVCB and HTTPS Resource Records, Nov 2023
8. ServiceMode RR compatibility and mandatory keys
In a ServiceMode RR, a SvcParamKey is considered "mandatory" if the
RR will not function correctly for clients that ignore this
SvcParamKey. Each SVCB protocol mapping SHOULD specify a set of keys
that are "automatically mandatory", i.e. mandatory if they are
present in an RR. The SvcParamKey "mandatory" is used to indicate
any mandatory keys for this RR, in addition to any automatically
mandatory keys that are present.
A ServiceMode RR is considered "compatible" with a client if the
client recognizes all the mandatory keys, and their values indicate
that successful connection establishment is possible. Incompatible RRs
are ignored (see step 5 of the procedure defined in Section 3)
The presentation value SHALL be a comma-separated list
(Appendix A.1) of one or more valid SvcParamKeys, either by their
registered name or in the unknown-key format (Section 2.1). Keys MAY
appear in any order, but MUST NOT appear more than once. For self-
consistency (Section 2.4.3), listed keys MUST also appear in the
SvcParams.
To enable simpler parsing, this SvcParamValue MUST NOT contain escape
sequences.
For example, the following is a valid list of SvcParams:
ipv6hint=... key65333=ex1 key65444=ex2 mandatory=key65444,ipv6hint
In wire format, the keys are represented by their numeric values in
network byte order, concatenated in strictly increasing numeric order.
This SvcParamKey is always automatically mandatory, and MUST NOT
appear in its own value-list. Other automatically mandatory keys
SHOULD NOT appear in the list either. (Including them wastes space
and otherwise has no effect.)
Tuple Fields§
§0: Vec<SvcParamKey>
Trait Implementations§
Source§impl<'r> BinDecodable<'r> for Mandatory
impl<'r> BinDecodable<'r> for Mandatory
Source§fn read(decoder: &mut BinDecoder<'r>) -> Result<Self, ProtoError>
fn read(decoder: &mut BinDecoder<'r>) -> Result<Self, ProtoError>
This expects the decoder to be limited to only this field, i.e. the end of input for the decoder is the end of input for the fields
In wire format, the keys are represented by their numeric values in
network byte order, concatenated in strictly increasing numeric order.
Source§fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Source§impl BinEncodable for Mandatory
impl BinEncodable for Mandatory
Source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
This expects the decoder to be limited to only this field, i.e. the end of input for the decoder is the end of input for the fields
In wire format, the keys are represented by their numeric values in
network byte order, concatenated in strictly increasing numeric order.
Source§impl<'de> Deserialize<'de> for Mandatory
impl<'de> Deserialize<'de> for Mandatory
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>,
Source§impl Display for Mandatory
impl Display for Mandatory
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
RFC 9460 SVCB and HTTPS Resource Records, Nov 2023
The presentation value SHALL be a comma-separated list (Appendix A.1) of one or more valid SvcParamKeys, either by their registered name or in the unknown-key format (Section 2.1). Keys MAY appear in any order, but MUST NOT appear more than once. For self- consistency (Section 2.4.3), listed keys MUST also appear in the SvcParams.
To enable simpler parsing, this SvcParamValue MUST NOT contain escape sequences.
For example, the following is a valid list of SvcParams:
ipv6hint=… key65333=ex1 key65444=ex2 mandatory=key65444,ipv6hint
impl Eq for Mandatory
impl StructuralPartialEq for Mandatory
Auto Trait Implementations§
impl Freeze for Mandatory
impl RefUnwindSafe for Mandatory
impl Send for Mandatory
impl Sync for Mandatory
impl Unpin for Mandatory
impl UnwindSafe for Mandatory
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.