# tev-client [![Crates.io](https://img.shields.io/crates/v/tev_client)](https://crates.io/crates/tev_client) This Rust crate implements a IPC TCP client for [tev](https://github.com/Tom94/tev). It enables programmatic control of the images displayed by _tev_ using a convenient and safe Rust api. Supports all existing _tev_ commands: * [PacketOpenImage](https://docs.rs/tev_client/latest/tev_client/struct.PacketOpenImage.html) open an existing image given the path * [PacketReloadImage](https://docs.rs/tev_client/latest/tev_client/struct.PacketReloadImage.html) reload an image from disk * [PacketCloseImage](https://docs.rs/tev_client/latest/tev_client/struct.PacketCloseImage.html) close an opened image * [PacketCreateImage](https://docs.rs/tev_client/latest/tev_client/struct.PacketCreateImage.html) create a new black image with given size and channels * [PacketUpdateImage](https://docs.rs/tev_client/latest/tev_client/struct.PacketUpdateImage.html) update part of the pixels of an opened image ## Example code: ```rust use tev_client::{TevClient, TevError, PacketCreateImage}; fn main() -> Result<(), TevError> { // Spawn a tev instance, this command assumes tev is on the PATH. // There are other constructors available too, see TevClient::spawn and TevClient::wrap. let mut client = TevClient::spawn_path_default()?; // Create a new image client.send(PacketCreateImage { image_name: "test", grab_focus: false, width: 1920, height: 1080, channel_names: &["R", "G", "B"], })?; Ok(()) } ```