#[non_exhaustive]pub enum Request {
Sync {
callback: Callback,
},
Disconnect,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sync
The sync request asks the EIS implementation to emit the ‘done’ event on the returned ei_callback object. Since requests are handled in-order and events are delivered in-order, this can be used as a synchronization point to ensure all previous requests and the resulting events have been handled.
The object returned by this request will be destroyed by the EIS implementation after the callback is fired and as such the client must not attempt to use it after that point.
The callback_data in the ei_callback.done event is always zero.
Note that for a client to use this request it must announce support for the “ei_callback” interface in ei_handshake.interface_version. It is a protocol violation to request sync without having announced the “ei_callback” interface and the EIS implementation must disconnect the client.
Disconnect
A request to the EIS implementation that this client should be disconnected. This is a courtesy request to allow the EIS implementation to distinquish between a client disconnecting on purpose and one disconnecting through the socket becoming invalid.
Immediately after sending this request, the client may destroy the ei_connection object and it should close the socket. The EIS implementation will treat the connection as already disconnected on receipt and does not send the ei_connection.disconnect event in response to this request.