Crate i3ipc_types

Source
Expand description

Crate contains types and implementations for communicating with i3. Also contained is protocol level communication using io::Read and Write

Modules§

event
For subscribing and receiving events, each struct matches a particular Subscribe variant. For instance, subscribing with Subscribe::Workspace will net Event::Workspace when workspace events are sent over the ipc.
msg
For sending messages to i3
reply
Contains structs for deserializing messages from i3

Structs§

MsgResponse
Instead of returning an enum, we’re returning a struct containing the Msg type and some body. An advantage to this over the enum method is that there is no minimum memory size that we must have. This is helpful when some variants are very large compared to others, as in the case of say reply::Node vs reply::Config

Constants§

MAGIC

Traits§

Connect
Types implementing this are provided a connect function and return a stream
I3IPC
Trait containing methods to encode and decode message from i3
I3Protocol

Functions§

decode_event
Given an event type and payload this function will deserialize the proper struct
socket_path
get socket path from i3