pub enum QRError {
MissingData,
DataTooLarge,
InvalidVersion(u8),
CanvasTooSmall {
width: u32,
height: u32,
},
InvalidColor(String),
EmptyGradient,
ImageLoadError(String),
ImageEncodeError(String),
IoError(Error),
ImageError(ImageError),
QRGenerationError(String),
SvgError(String),
}Expand description
Errors that can occur during QR code generation and styling.
Variants§
MissingData
No data provided for QR code generation.
DataTooLarge
Data is too large to fit in the specified QR code version.
InvalidVersion(u8)
Invalid QR code version specified.
CanvasTooSmall
Canvas dimensions are too small for the QR code.
InvalidColor(String)
Invalid color format provided.
EmptyGradient
Gradient must have at least one color stop.
ImageLoadError(String)
Failed to load an image.
ImageEncodeError(String)
Failed to encode an image.
IoError(Error)
IO error occurred.
ImageError(ImageError)
Image processing error.
QRGenerationError(String)
QR code generation error.
SvgError(String)
SVG rendering error.
Trait Implementations§
Source§impl Error for QRError
impl Error for QRError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<ImageError> for QRError
impl From<ImageError> for QRError
Source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QRError
impl !RefUnwindSafe for QRError
impl Send for QRError
impl Sync for QRError
impl Unpin for QRError
impl !UnwindSafe for QRError
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
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.