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
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.For sending messages to i3
Contains structs for deserializing messages from i3
Structs
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::ConfigConstants
Traits
Types implementing this are provided a connect function and return a stream
Trait containing methods to encode and decode message from i3
Functions
Given an event type and payload this function will deserialize the proper
struct
get socket path from i3