Enum Error

Source
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,
    },
}
Expand description

Build errors

Variantsยง

ยง

Io

IO error

Fields

ยงio_error: Error

The underlying error

ยงpath: PathBuf

Path at which it occurred

ยง

Image

Image decoding error

Fields

ยง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

ยงpath: PathBuf

The argument to pxl_build::build

ยง

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

ยง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

ยง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

ยงpath: PathBuf

The offending path

ยง

MissingExtension

Indicates that a resource filenmae had no extension.

Fields

ยงpath: PathBuf

The offending path

ยง

UnsupportedExtension

Indicates a filename had an unsupported extension.

See the readme for supported extensions and filetypes.

Fields

ยงpath: PathBuf

The offending path

ยงextension: String

The offending extension

Trait Implementationsยง

Sourceยง

impl Debug for Error

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

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

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

Sourceยง

fn from(tuple: (Error, &'path Path)) -> Error

Converts to this type from the input type.
Sourceยง

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

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

Sourceยง

fn from(tuple: (ImageError, &'path Path)) -> Error

Converts to this type from the input type.

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Component + Float, Swp: WhitePoint, Dwp: WhitePoint, D: AdaptFrom<S, Swp, Dwp, T>,

Sourceยง

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<Swp, Dwp, T>,

Convert the source color to the destination color using the specified method
Sourceยง

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default
Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

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

Sourceยง

impl<T> IntoEither for T

Sourceยง

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Sourceยง

impl<T> Pointable for T

Sourceยง

const ALIGN: usize

The alignment of pointer.
Sourceยง

type Init = T

The type for initializers.
Sourceยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Sourceยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Sourceยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Sourceยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Sourceยง

impl<T> SetParameter for T

Sourceยง

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result
where T: Parameter<Self>,

Sets value as a parameter of self.
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.