Crate tev_client[][src]

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:

Example code:

use std::process::Command;
use tev_client::{PacketCreateImage, TevClient};

fn main() -> std::io::Result<()> {
    //spawn a tev instance, this command assumes tev is in PATH
    let mut client = TevClient::spawn_path_default()?;

    //send a command to tev
    client.send(PacketCreateImage {
        image_name: "test",
        grab_focus: false,
        width: 1920,
        height: 1080,
        channel_names: &["R", "G", "B"],
    })?;

    Ok(())
}

Structs

PacketCloseImage

Close an image.

PacketCreateImage

Create a new image with name image_name, size (width, height) and channels channel_names.

PacketOpenImage

Opens a new image where image_name is the path.

PacketReloadImage

Reload an existing image with name or path image_name from disk.

PacketUpdateImage

Update part of an existing image with new pixel data.

TevClient

A connection to a Tev instance. Constructed using TevClient::wrap, TevClient::spawn or TevClient::spawn_path_default. Use TevClient::send to send commands.