[−][src]Module tokio_i3ipc::codec
Implements tokio_codec
's Decoder
trait
Using EventCodec
to subscribe to event::Event
from i3:
use tokio_i3ipc::{event::Subscribe, I3}; #[tokio::main(flavor = "current_thread")] async fn main() -> io::Result<()> { let mut i3 = I3::connect().await?; i3.subscribe([Subscribe::Window]).await?; let mut listener = i3.listen(); while let Some(event) = listener.next().await { println!("{:#?}", event); } Ok(()) }
Structs
EventCodec | This codec only impls |