pub struct Capabilities(/* private fields */);Expand description
What this server can actually do, as named booleans.
The specification calls for named booleans and permits any additional key,
so this is carried as an ordered map rather than a struct of bool fields:
it serialises to exactly the same JSON, keeps the capability names in one
list beside the class rule that reads them, and lets a future capability be
added without reshaping a type.
A capability this server does not implement is reported false, never
omitted — the specification is explicit that a client must be able to tell
“not supported” from “server predates this field”.
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub fn current() -> Self
pub fn current() -> Self
What this build implements today.
Every flag here is the truth, so a client planning against this document is never told a surface exists that would fail on first use. A capability is added to this list when its conformance checks pass, not when its handler exists.
Sourcepub fn class(&self) -> &'static str
pub fn class(&self) -> &'static str
The highest class these capabilities actually satisfy.
The enum admits only core, extended and full, so a server that
does not yet meet core still has to name one. It names core — the
floor it is building toward — and the shortfall surfaces as a failing
D-05 rather than as a document that quietly overstates itself.