pub struct JobSnapshot {
pub completion: Option<Reported>,
pub error: Option<String>,
pub estimated_print_time_s: Option<i64>,
pub file_name: Option<String>,
pub file_origin: Option<String>,
pub print_time_left_s: Option<i64>,
pub print_time_s: Option<i64>,
pub size_bytes: Option<i64>,
pub state: PrinterState,
}Expand description
The job a printer reports it is running.
Every field but state is optional: an absent one means the source did
not
report it.
Fields§
§completion: Option<Reported>How far through the print is, as a fraction from zero to one.
Normalized to a fraction here regardless of how the source expresses it.
error: Option<String>The error the source reports, when it reports one.
estimated_print_time_s: Option<i64>The whole print’s estimated duration, in whole seconds.
file_name: Option<String>The name of the file being printed, as the source reported it.
file_origin: Option<String>Where the file lives, in the source’s own vocabulary.
print_time_left_s: Option<i64>How long the print has left, in whole seconds.
print_time_s: Option<i64>How long the print has been running, in whole seconds.
size_bytes: Option<i64>The file’s size in bytes.
state: PrinterStateThe state the source reports the job to be in.
Trait Implementations§
Source§impl Clone for JobSnapshot
impl Clone for JobSnapshot
Source§impl Debug for JobSnapshot
impl Debug for JobSnapshot
Source§impl<'de> Deserialize<'de> for JobSnapshot
impl<'de> Deserialize<'de> for JobSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for JobSnapshot
impl PartialEq for JobSnapshot
Source§impl Serialize for JobSnapshot
impl Serialize for JobSnapshot
impl StructuralPartialEq for JobSnapshot
Auto Trait Implementations§
impl Freeze for JobSnapshot
impl RefUnwindSafe for JobSnapshot
impl Send for JobSnapshot
impl Sync for JobSnapshot
impl Unpin for JobSnapshot
impl UnsafeUnpin for JobSnapshot
impl UnwindSafe for JobSnapshot
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