Enum pxl_build::Error[][src]

pub enum Error {
    Io {
        io_error: Error,
        path: PathBuf,
    },
    Image {
        image_error: ImageError,
        path: PathBuf,
    },
    IsNotDirectory {
        path: PathBuf,
    },
    NonUnicodePath {
        path: PathBuf,
    },
    ConflictingIdentifiers {
        a: PathBuf,
        b: PathBuf,
        identifier: String,
    },
    FilenameNotValidRustIdentifier {
        path: PathBuf,
    },
    MissingExtension {
        path: PathBuf,
    },
    UnsupportedExtension {
        path: PathBuf,
        extension: String,
    },
}

Build errors

Variants

IO error

Fields of Io

The underlying error

Path at which it occurred

Image decoding error

Fields of Image

The underlying error

The path at which it occurred

The argument to pxl_build::build was not a directory

Fields of IsNotDirectory

The argument to pxl_build::build

Indicates that a path could not be converted to unicode.

Since pxl_build generates rust modules and statics with names derived from their paths, their paths must be valid unicode.

Fields of NonUnicodePath

The offending path

Indicates that two resources mapped to identical identifiers in the same module.

For example, resources/PLAYER.png and resources/player.png will both have the identifier PLAYER, and will trigger this error.

Fields of ConflictingIdentifiers

The first path

The second path

The identifier that they path map to

Indicates that a filename contained characters that are not allowed inside of rust identifiers.

Filename stems must match [a-zA-Z][a-zA-Z0-9_-]*.

Fields of FilenameNotValidRustIdentifier

The offending path

Indicates that a resource filenmae had no extension.

Fields of MissingExtension

The offending path

Indicates a filename had an unsupported extension.

See the readme for supported extensions and filetypes.

Fields of UnsupportedExtension

The offending path

The offending extension

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter. Read more

impl<'path> From<(Error, &'path Path)> for Error
[src]

Converts from an (io::Error, &Path) tuple to a pxl Error

Performs the conversion.

impl<'path> From<(ImageError, &'path Path)> for Error
[src]

Converts from an (image::ImageError, &Path) tuple to a pxl Error

Performs the conversion.

Auto Trait Implementations

impl Send for Error

impl Sync for Error