#[non_exhaustive]pub enum DiscoveryEvent {
PrinterAdded(PrinterSnapshot),
PrinterRemoved {
id: String,
backend: String,
},
PrinterStateChanged {
id: String,
backend: String,
state: PrinterState,
accepting_jobs: bool,
},
}Available on crate feature
zbus-backend only.Expand description
An event emitted during printer discovery or state monitoring.
Marked #[non_exhaustive] so a future backend event kind can be
added without breaking downstream matches — always include a _
arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PrinterAdded(PrinterSnapshot)
A printer was discovered or re-announced.
PrinterRemoved
A printer was removed from the backend.
PrinterStateChanged
A printer’s state or accepting-jobs status changed.
Trait Implementations§
Source§impl Clone for DiscoveryEvent
impl Clone for DiscoveryEvent
Source§fn clone(&self) -> DiscoveryEvent
fn clone(&self) -> DiscoveryEvent
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 DiscoveryEvent
impl Debug for DiscoveryEvent
impl Eq for DiscoveryEvent
Source§impl Hash for DiscoveryEvent
impl Hash for DiscoveryEvent
Source§impl PartialEq for DiscoveryEvent
impl PartialEq for DiscoveryEvent
Source§fn eq(&self, other: &DiscoveryEvent) -> bool
fn eq(&self, other: &DiscoveryEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DiscoveryEvent
Auto Trait Implementations§
impl Freeze for DiscoveryEvent
impl RefUnwindSafe for DiscoveryEvent
impl Send for DiscoveryEvent
impl Sync for DiscoveryEvent
impl Unpin for DiscoveryEvent
impl UnsafeUnpin for DiscoveryEvent
impl UnwindSafe for DiscoveryEvent
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