pub enum PrinterError {
NoMedia,
EndOfMedia,
CutterJam,
PrinterInUse,
PrinterOffline,
InvalidMedia,
BufferFull,
CommunicationError,
CoverOpen,
FeedMediaFail,
SystemError,
UnknownError((u8, u8)),
}Expand description
Hardware-specific errors reported by the printer.
These errors are parsed from the printer’s status response and indicate physical problems with the device that need user intervention.
Variants§
NoMedia
EndOfMedia
CutterJam
PrinterInUse
PrinterOffline
InvalidMedia
BufferFull
CommunicationError
CoverOpen
FeedMediaFail
SystemError
UnknownError((u8, u8))
Implementations§
Source§impl PrinterError
impl PrinterError
Sourcepub fn is_no_error(&self) -> bool
pub fn is_no_error(&self) -> bool
Check if this represents a “no error” state.
Returns true if the printer is reporting no error condition.
Used to distinguish between actual errors and normal status.
§Returns
true if no error is present, false otherwise
Trait Implementations§
Source§impl Debug for PrinterError
impl Debug for PrinterError
Source§impl Display for PrinterError
impl Display for PrinterError
Source§impl Error for PrinterError
impl Error for PrinterError
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 PrinterError
impl RefUnwindSafe for PrinterError
impl Send for PrinterError
impl Sync for PrinterError
impl Unpin for PrinterError
impl UnsafeUnpin for PrinterError
impl UnwindSafe for PrinterError
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