pub struct PollStatus {
pub reasons: PrinterReason,
pub ready_media: Option<ReadyMedia>,
pub supply_percent: Option<u8>,
}Expand description
Live status reported by DeviceBackend::poll_status. Returning None
from the poll means “no update”; returning Some(PollStatus) replaces the
reasons and, when the optional fields are set, the dynamic media/supply
attributes.
Fields§
§reasons: PrinterReasonFresh printer-state-reasons.
ready_media: Option<ReadyMedia>Currently-loaded media, if the device can report it.
supply_percent: Option<u8>Remaining-supply level 0–100 (e.g. labels left on the roll), if known.
Implementations§
Source§impl PollStatus
impl PollStatus
Sourcepub fn from_reasons(reasons: PrinterReason) -> Self
pub fn from_reasons(reasons: PrinterReason) -> Self
Convenience constructor for backends that only report reasons.
Trait Implementations§
Source§impl Clone for PollStatus
impl Clone for PollStatus
Source§fn clone(&self) -> PollStatus
fn clone(&self) -> PollStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PollStatus
impl Debug for PollStatus
Auto Trait Implementations§
impl Freeze for PollStatus
impl RefUnwindSafe for PollStatus
impl Send for PollStatus
impl Sync for PollStatus
impl Unpin for PollStatus
impl UnsafeUnpin for PollStatus
impl UnwindSafe for PollStatus
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