| Crates.io | tev_client |
| lib.rs | tev_client |
| version | 0.5.2 |
| created_at | 2021-03-15 02:57:15.035474+00 |
| updated_at | 2022-01-02 13:06:26.547796+00 |
| description | An IPC TCP client for tev |
| homepage | |
| repository | https://github.com/KarelPeeters/tev_client |
| max_upload_size | |
| id | 369032 |
| size | 16,058 |
This Rust crate implements a IPC TCP client for tev. It enables programmatic control of the images displayed by tev using a convenient and safe Rust api.
Supports all existing tev commands:
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(())
}