pub enum Error {
Show 16 variants
AddonNotFound(PathBuf),
DataLuaParse(String),
EntryNotFound(Uuid),
DuplicateKey {
type: MediaType,
key: String,
existing_id: Uuid,
},
UnsupportedFormat {
target_type: MediaType,
extension: String,
},
InvalidImage(String),
InvalidDimensions {
width: u32,
height: u32,
},
ImageTooLarge {
max: u32,
actual: u32,
},
InvalidFont(String),
InvalidLocale(String),
InvalidAudio(String),
FileTooLarge {
path: PathBuf,
actual: u64,
max: u64,
},
ImageConversion(String),
AudioConversion(String),
Io {
source: Error,
path: PathBuf,
},
Lua(Error),
}Expand description
Core error type for the wow-sharedmedia library.
Variants§
AddonNotFound(PathBuf)
The requested addon directory does not exist.
DataLuaParse(String)
Failed to parse the addon’s data.lua file into structured data.
EntryNotFound(Uuid)
No entry exists for the provided UUID.
DuplicateKey
An entry with the same media type and key already exists.
Fields
UnsupportedFormat
The input file extension is not accepted for the target media type.
InvalidImage(String)
The image file could not be parsed or validated.
InvalidDimensions
The image has invalid zero or negative-equivalent dimensions.
ImageTooLarge
The image exceeds the supported maximum dimension.
InvalidFont(String)
The font file could not be parsed or validated.
InvalidLocale(String)
Locale configuration is invalid for the requested operation.
InvalidAudio(String)
The audio file could not be parsed or validated.
FileTooLarge
The file exceeds the per-type size limit.
Fields
ImageConversion(String)
Image transcoding or serialization failed.
AudioConversion(String)
Audio transcoding or serialization failed.
Io
Filesystem access failed.
Lua(Error)
Interaction with the embedded Lua runtime failed.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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
Source§impl<E> ExternalError for E
impl<E> ExternalError for E
fn into_lua_err(self) -> Error
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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