Crate kittage

Crate kittage 

Source
Expand description

§kittage

A full-featured rust library for interacting with the kitty terminal graphics protocol. This is still a work in progress but aims to implement all parts of the client side of the kitty terminal graphics protocol. At time of writing, it implements everything (including e.g. shared memory objects and reading in terminal responses) besides animation frames.

To start using it, you probably want to examine the documentation for the Action struct.

Modules§

action
The Action type
delete
Types and functions to facilitate crate::action::Action::Delete
display
Structs and functions useful for controlling exactly where an image is displayed in the terminal surface and what happens when it is displayed
error
Errors that can occur while interacting with this library
image
The Image struct and associated functions to control how it is transmitted to the terminal
medium
The Medium, SharedMemObject and ChunkSize structs for configuring how data is sent
tmux
Struct for facilitating Tmux passthrough

Structs§

ImageDimensions
The dimensions of the image to display. This specifies a specific crop of the image to display, and must not specify a size larger than the source image. If it is smaller, only a cropped subset of the original image will be sent/displayed

Enums§

AnyValueOrSpecific
Sometimes when reading a response from the protocol, we expect the terminal to give us a value back. Sometimes we expect that value to be something specific (e.g. 1), and sometimes we don’t care what the value is - we just want something. This enum is used to distinguish between the two
Compression
Which method of compression was used to compress the data being sent to the terminal
IdentifierType
Multiple types of identifiers exist within the kitty protocol, and this enum just exists to distinguish between them where they perform similar operations
NumberOrId
Used to either specify an Image ID or Image Number - see the details on IdentifierType for explanations of how Image IDs vs Numbers are used.
PixelFormat
The format of the image data that is being sent
Verbosity
A way to configure how the terminal responds to all the commands written to it

Traits§

AsyncInputReader
A trait to facilitate reading from stdin in an async manner - the async version of InputReader
InputReader
A trait to facilitate reading from stdin - the sync version of AsyncInputReader

Type Aliases§

ImageId
An Id that can be used to identify an image sent to the terminal - see IdentifierType::ImageId
ImageNumber
A number that can be used to identify an image sent to the terminal - see IdentifierType::ImageNumber
PlacementId
An Id that can be used to identify a specific placement of an image so that you can have a single image displayed multiple times on the same surface. See IdentifierType::PlacementId