pub fn initialize_session(
answer: &JsonObject,
preferred: ProtocolVersion,
supported: &SupportedVersions,
config: &ClientConfig,
) -> Result<NegotiatedSession, HandshakeError>Expand description
Reads an initialize answer into a session.
The three required fields of InitializeResult and nothing else.
instructions is ignored rather than carried: it is a human-facing hint with
no client behaviour behind it, and a session that stored it would hand
callers a field nothing gates on.
ยงErrors
HandshakeError::MalformedResult naming the field that is wrong, and
NegotiationError::UnsupportedServerVersion when the answer is a revision
this build cannot speak.