pub enum KittyImageData {
    Direct(String),
    File {
        path: String,
        data_size: Option<u32>,
        data_offset: Option<u32>,
    },
    TemporaryFile {
        path: String,
        data_size: Option<u32>,
        data_offset: Option<u32>,
    },
    SharedMem {
        name: String,
        data_size: Option<u32>,
        data_offset: Option<u32>,
    },
}

Variants

Direct(String)

The data bytes, baes64-encoded fragments. t=‘d’

File

Fields

path: String
data_size: Option<u32>

the amount of data to read. S=…

data_offset: Option<u32>

The offset at which to read. O=…

The path to a file containing the data. t=‘f’

TemporaryFile

Fields

path: String
data_size: Option<u32>

the amount of data to read. S=…

data_offset: Option<u32>

The offset at which to read. O=…

The path to a temporary file containing the data. If the path is in a known temporary location, it should be removed once the data has been read t=‘t’

SharedMem

Fields

name: String
data_size: Option<u32>

the amount of data to read. S=…

data_offset: Option<u32>

The offset at which to read. O=…

The name of a shared memory object. Can be opened via shm_open() and then should be removed via shm_unlink(). On Windows, OpenFileMapping(), MapViewOfFile(), UnmapViewOfFile() and CloseHandle() are used to access and release the data. t=‘s’

Implementations

Take the image data bytes. This operation is not repeatable as some of the sources require removing the underlying file or shared memory object as part of the read operaiton.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.