#[repr(transparent)]pub struct Mandatory(pub Vec<SvcParamKey>);
Expand description
7. 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. If the SVCB
RRSet contains no compatible RRs, the client will generally act as if
the RRSet is empty.
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:
echconfig=... key65333=ex1 key65444=ex2 mandatory=key65444,echconfig
In wire format, the keys are represented by their numeric values in
network byte order, concatenated in ascending 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
sourceimpl<'r> BinDecodable<'r> for Mandatory
impl<'r> BinDecodable<'r> for Mandatory
sourcefn read(decoder: &mut BinDecoder<'r>) -> ProtoResult<Self>
fn read(decoder: &mut BinDecoder<'r>) -> ProtoResult<Self>
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 ascending order.
sourcefn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
Returns the object in binary form
sourceimpl BinEncodable for Mandatory
impl BinEncodable for Mandatory
sourcefn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
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 ascending order.
sourcefn to_bytes(&self) -> ProtoResult<Vec<u8>>
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
Returns the object in binary form
sourceimpl<'de> Deserialize<'de> for Mandatory
impl<'de> Deserialize<'de> for Mandatory
sourcefn 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
sourceimpl Display for Mandatory
impl Display for Mandatory
sourcefn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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:
echconfig=… key65333=ex1 key65444=ex2 mandatory=key65444,echconfig
impl Eq for Mandatory
impl StructuralEq for Mandatory
impl StructuralPartialEq for Mandatory
Auto Trait Implementations
impl RefUnwindSafe for Mandatory
impl Send for Mandatory
impl Sync for Mandatory
impl Unpin for Mandatory
impl UnwindSafe for Mandatory
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
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,
sourcefn equivalent(&self, key: &K) -> bool
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.
sourcefn clone_into(&self, target: &mut T)
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>,
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