#[non_exhaustive]pub struct UnsupportedMatcherKey {
pub class: String,
pub draft: DraftVersion,
pub kind: Option<MatchKind>,
pub key: MatcherKey,
}Expand description
A class rule keyed on something no unit it could claim ever carries.
Returned by Capabilities::admit_class and
Capabilities::admit_profile before a session forwards anything,
so the rule never arms. The message names the draft and the key, because
either alone is unactionable: “keys on track_alias” does not say which
session it is dead in, and “draft-19” does not say what to change.
#[non_exhaustive] with public fields: nobody constructs an error, and a
later release naming a seventh key must not be a breaking change.
Reading the fields from outside the crate stays legal, which is what lets
a caller branch on the key rather than parse the message.
Display is hand-written rather than a thiserror
attribute, unlike
ShapeError: the message has two shapes,
because a rule that named no MatchKind was judged against both framed
kinds and naming one of them in the refusal would misreport what the rule
asked for.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.class: StringThe ClassRule::name holding the dead key.
draft: DraftVersionThe draft the session would run as.
kind: Option<MatchKind>The stream kind the rule was aimed at, or None when it named none
and the key is carried by neither framed kind on this draft.
key: MatcherKeyThe key that can never match.
Trait Implementations§
Source§impl Clone for UnsupportedMatcherKey
impl Clone for UnsupportedMatcherKey
Source§impl Debug for UnsupportedMatcherKey
impl Debug for UnsupportedMatcherKey
Source§impl Display for UnsupportedMatcherKey
impl Display for UnsupportedMatcherKey
impl Eq for UnsupportedMatcherKey
Source§impl Error for UnsupportedMatcherKey
impl Error for UnsupportedMatcherKey
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()