pub enum PrinterState {
Show 27 variants
None,
Paused,
Error,
PendingDeletion,
PaperJam,
PaperOut,
ManualFeed,
PaperProblem,
Offline,
IOActive,
Busy,
Printing,
OutputBinFull,
NotAvailable,
Waiting,
Processing,
Initializing,
WarmingUp,
TonerLow,
NoToner,
PagePunt,
UserInterventionRequired,
OutOfMemory,
DoorOpen,
ServerUnknown,
PowerSave,
StatusUnknown,
}Expand description
Represents a printer’s state using .NET PrintQueueStatus flags
This enum represents the actual WMI PrinterState values which correspond to the .NET System.Printing.PrintQueueStatus enumeration flags. See: https://learn.microsoft.com/en-us/dotnet/api/system.printing.printqueuestatus
Variants§
None
Paused
Error
PendingDeletion
PaperJam
PaperOut
ManualFeed
PaperProblem
Offline
IOActive
Busy
Printing
OutputBinFull
NotAvailable
Waiting
Processing
Initializing
WarmingUp
TonerLow
NoToner
PagePunt
UserInterventionRequired
OutOfMemory
DoorOpen
ServerUnknown
PowerSave
StatusUnknown
Implementations§
Source§impl PrinterState
impl PrinterState
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Returns a human-readable description of this printer state.
§Returns
A static string describing the status
Sourcepub fn to_printer_status(&self) -> PrinterStatus
pub fn to_printer_status(&self) -> PrinterStatus
Converts PrinterState to equivalent PrinterStatus when possible
§Returns
PrinterStatus equivalent or StatusUnknown if no mapping exists
Sourcepub fn is_offline(&self) -> bool
pub fn is_offline(&self) -> bool
Checks if this status represents an offline condition
Trait Implementations§
Source§impl Clone for PrinterState
impl Clone for PrinterState
Source§fn clone(&self) -> PrinterState
fn clone(&self) -> PrinterState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrinterState
impl Debug for PrinterState
Source§impl Display for PrinterState
impl Display for PrinterState
Source§impl PartialEq for PrinterState
impl PartialEq for PrinterState
impl StructuralPartialEq for PrinterState
Auto Trait Implementations§
impl Freeze for PrinterState
impl RefUnwindSafe for PrinterState
impl Send for PrinterState
impl Sync for PrinterState
impl Unpin for PrinterState
impl UnwindSafe for PrinterState
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