Enum hypercore_protocol::Event [−][src]
#[non_exhaustive] pub enum Event { Handshake([u8; 32]), DiscoveryKey(DiscoveryKey), Channel(Channel), Close(DiscoveryKey), }
Expand description
A protocol event.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Emitted after the handshake with the remove peer is complete. This is the first event (if the handshake is not disabled).
Emitted when the remote peer opens a channel that we did not yet open.
Tuple Fields of DiscoveryKey
0: DiscoveryKey
Emitted when a channel is established.
Tuple Fields of Channel
0: Channel
Emitted when a channel is closed.
Tuple Fields of Close
0: DiscoveryKey