pub enum Error {
Show 18 variants
RusbError(Error),
CP437Error(String),
ImageError(ImageError),
NoBulkEndpoint,
NoReplacementFound(String),
NoPrintData,
UnsupportedFont,
NoFontFound,
UnsupportedForPrinterConnection,
PrinterError(String),
WrongMarkdown,
NoTables,
NoTableFound(String),
NoWidth,
NoQrContent(String),
NoQrContents,
Encoding,
BarcodeError,
}
Expand description
Errors that this crate throws.
Variants§
RusbError(Error)
Error related to rusb
CP437Error(String)
For text printing, the replaced sequence could not be found
ImageError(ImageError)
Error regarding image treatment
NoBulkEndpoint
This means no bulk endpoint could be found
NoReplacementFound(String)
No replacement string for an instruction was found
NoPrintData
PrintData should’ve been supplied.
UnsupportedFont
The specified font does not seem to be supported by the printer profile
NoFontFound
At least one font needs to be available in the profile
UnsupportedForPrinterConnection
Indicates that a builder method was called on the wrong printer connection
PrinterError(String)
WrongMarkdown
NoTables
NoTableFound(String)
NoWidth
NoQrContent(String)
NoQrContents
Encoding
BarcodeError
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for Error
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
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>
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 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>
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