Module protocol

Module protocol 

Source
Expand description

Protocol message types and serialization.

This module contains the types and serialization methods for the protocol messages.

Structs§

ClientAuthentication
Serves as the client’s response to the server’s challenge.
ClientPreamble
Serves as the preamble for the connection.
ProtocolMessageGuard
The self-referencing struct.
ProtocolMessageGuardAsyncBuilder
A more verbose but stable way to construct self-referencing structs. It is comparable to using StructName { field1: value1, field2: value2 } rather than StructName::new(value1, value2). This has the dual benefit of making your code both easier to refactor and more readable. Call build() to construct the actual struct. The fields of this struct should be used as follows:
ProtocolMessageGuardAsyncSendBuilder
A more verbose but stable way to construct self-referencing structs. It is comparable to using StructName { field1: value1, field2: value2 } rather than StructName::new(value1, value2). This has the dual benefit of making your code both easier to refactor and more readable. Call build() to construct the actual struct. The fields of this struct should be used as follows:
ProtocolMessageGuardAsyncSendTryBuilder
A more verbose but stable way to construct self-referencing structs. It is comparable to using StructName { field1: value1, field2: value2 } rather than StructName::new(value1, value2). This has the dual benefit of making your code both easier to refactor and more readable. Call try_build() or try_build_or_recover() to construct the actual struct. The fields of this struct should be used as follows:
ProtocolMessageGuardAsyncTryBuilder
A more verbose but stable way to construct self-referencing structs. It is comparable to using StructName { field1: value1, field2: value2 } rather than StructName::new(value1, value2). This has the dual benefit of making your code both easier to refactor and more readable. Call try_build() or try_build_or_recover() to construct the actual struct. The fields of this struct should be used as follows:
ProtocolMessageGuardBuilder
A more verbose but stable way to construct self-referencing structs. It is comparable to using StructName { field1: value1, field2: value2 } rather than StructName::new(value1, value2). This has the dual benefit of making your code both easier to refactor and more readable. Call build() to construct the actual struct. The fields of this struct should be used as follows:
ProtocolMessageGuardTryBuilder
A more verbose but stable way to construct self-referencing structs. It is comparable to using StructName { field1: value1, field2: value2 } rather than StructName::new(value1, value2). This has the dual benefit of making your code both easier to refactor and more readable. Call try_build() or try_build_or_recover() to construct the actual struct. The fields of this struct should be used as follows:
ServerPreamble
Serves as the server’s response to the preamble, containing its public key, its signature of the client’s challenge and a challenge. The server signs the client’s challenge to prove its identity.

Enums§

ProtocolError
A helper type for protocol errors.
ProtocolMessage
A helper type for protocol messages.

Traits§

BincodeReceive
A trait for receiving protocol messages over a stream.
BincodeSend
A trait for sending protocol messages over a stream.

Type Aliases§

Challenge
A helper type for a challenge.
ExchangePublicKey
A helper type for an ephemeral public key.
Signature
A helper type for a signature.