Skip to main content

Module features

Module features 

Source
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. 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. A name stays once added.

Modules§

names
Features on 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::all is every one this build knows, and client & server those on for a connection. Bit positions are this build’s own; only names cross the wire (names).