pub enum Error {
PngEncodingError(EncodingError),
PngDecodingError(DecodingError),
TileError {
error: Error,
url: String,
},
InvalidSize,
BuildError(&'static str),
}
Expand description
An enum containing all possible errors when interacting with this library.
Variants§
PngEncodingError(EncodingError)
Error when encoding image to PNG.
PngDecodingError(DecodingError)
Error when decoding PNG from bytes.
TileError
Request error when fetching tile from a tile server.
InvalidSize
Invalid image size.
BuildError(&'static str)
Missing a field/fields when consuming a builder.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<DecodingError> for Error
impl From<DecodingError> for Error
source§fn from(e: DecodingError) -> Self
fn from(e: DecodingError) -> Self
Converts to this type from the input type.
source§impl From<EncodingError> for Error
impl From<EncodingError> for Error
source§fn from(e: EncodingError) -> Self
fn from(e: EncodingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more