Enum usvg::ImageData [] [src]

pub enum ImageData {
    Path(PathBuf),
    Raw(Vec<u8>),
}

A raster image container.

Variants

Path to a PNG, JPEG or SVG(Z) image.

Preprocessor checks that file exists, but because it can be removed later, there is no guarantee that this path is valid.

An image raw data.

It's not a decoded image data, but the data that was decoded from base64. So you still need a PNG, JPEG and SVG(Z) decoding library.

Trait Implementations

Auto Trait Implementations

impl Send for ImageData

impl Sync for ImageData