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
IO error
Fields of Io
io_error: Error | The underlying error |
path: PathBuf | Path at which it occurred |
Image
Image decoding error
Fields of Image
image_error: ImageError | The underlying error |
path: PathBuf | The path at which it occurred |
IsNotDirectory
The argument to pxl_build::build
was not a directory
Fields of IsNotDirectory
path: PathBuf | The argument to |
NonUnicodePath
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
path: PathBuf | The offending path |
ConflictingIdentifiers
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
a: PathBuf | The first path |
b: PathBuf | The second path |
identifier: String | The identifier that they path map to |
FilenameNotValidRustIdentifier
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
path: PathBuf | The offending path |
MissingExtension
Indicates that a resource filenmae had no extension.
Fields of MissingExtension
path: PathBuf | The offending path |
UnsupportedExtension
Indicates a filename had an unsupported extension.
See the readme for supported extensions and filetypes.
Fields of UnsupportedExtension
path: PathBuf | The offending path |
extension: String | The offending extension |
Trait Implementations
impl Debug for Error
[src]
impl Debug for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'path> From<(Error, &'path Path)> for Error
[src]
impl<'path> From<(Error, &'path Path)> for Error
Converts from an (io::Error, &Path)
tuple to a
pxl Error
impl<'path> From<(ImageError, &'path Path)> for Error
[src]
impl<'path> From<(ImageError, &'path Path)> for Error
Converts from an (image::ImageError, &Path)
tuple to a
pxl Error