Expand description
Regular features: how a server knows a client handles something.
A client names the features it handles in Hello::features; the
server’s answer, ServerInfo::features, names those of them it has.
A feature is on for the connection only when both named it. Then, and
only then, the server answers the feature’s requests (a request of a
feature that is off is Unsupported, as one it does not know) and
sends its events. A name either side does not know is ignored, never
an error, and both fields are left out when empty, so an older peer
sends and reads what it did before.
Every opt-in request and event comes with a feature. A new reply field
needs none: it is serde(default), and an Option where its absence
means something else than its default. One is gated all the same, at
the owner’s word: spoolframe:rating-sources’s, which a server leaves
out of its replies to a connection without the feature. Nothing is decided from a
version number. Unlike the experimental features
(crate::experimental), these are ordinary protocol, with its
stability, and a server that has one always names it when asked.
The scheme is dated: a feature is what was added by its date, whatever the mix, so a client names one thing for all of it. Later additions get a new dated name; the one a release has shipped never changes what it holds, and a name stays once added.
Modules§
- names
Featureson the wire, for#[serde(with = "names")]: the list of their names. A name this build does not know is skipped as it is read. Never enumset’s own serde, which would send its bits.
Enums§
- Feature
- A regular feature. On the wire it is its name (
Feature::name).
Type Aliases§
- Features
- A set of features:
Features::allis every one this build knows, andclient & serverthose on for a connection. Bit positions are this build’s own; only names cross the wire (names).