[][src]Crate greetd_ipc

greetd IPC protocol library

This library implements the greetd IPC protocol.

The library exposes a Request and a Response enum, representing the valid protocol messages. Furthermore, codec implementations are available to serialize these to/from both sync and async readers/writers. The availability of these are controlled by feature flags.

Additional types are part of the different request and response values.

See agreety for a simple example use of this library.

Format

The message format is as follows:

+----------+-------------------+
| len: u32 | JSON payload: str |
+----------+-------------------+

Length is in native byte-order. The JSON payload is a variant of the Request or Response enums.

Request and response types

See Request and Response for information about the request and response types, as well as their serialization.

Modules

codec

Reader/writer codecs for Request/Response.

Enums

AuthMessageType

A message type for a Response::AuthMessage. Serialized as snake_case.

ErrorType

An error type for Response::Error. Serialized as snake_case.

Request

A request from a greeter to greetd. The request type is internally tagged with the"type" field, with the type written in snake_case.

Response

A response from greetd to a greeter. The request type is internally tagged with the"type" field, with the type written in snake_case.