pub struct JobSnapshot {
pub file_name: Option<String>,
pub file_origin: Option<String>,
pub size_bytes: Option<i64>,
pub estimated_print_time_s: Option<i64>,
pub completion: Option<Reported<f64>>,
pub print_time_s: Option<i64>,
pub print_time_left_s: Option<i64>,
pub state: PrinterState,
pub error: Option<String>,
}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§
§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.
size_bytes: Option<i64>The file’s size in bytes.
estimated_print_time_s: Option<i64>The whole print’s estimated duration, in whole seconds.
completion: Option<Reported<f64>>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.
print_time_s: Option<i64>How long the print has been running, in whole seconds.
print_time_left_s: Option<i64>How long the print has left, in whole seconds.
state: PrinterStateThe state the source reports the job to be in.
error: Option<String>The error the source reports, when it reports one.
Trait Implementations§
Source§impl Clone for JobSnapshot
impl Clone for JobSnapshot
Source§fn clone(&self) -> JobSnapshot
fn clone(&self) -> JobSnapshot
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 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 JsonSchema for JobSnapshot
impl JsonSchema for JobSnapshot
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for JobSnapshot
impl PartialEq for JobSnapshot
Source§impl Sample for JobSnapshot
impl Sample for JobSnapshot
Source§fn sample_full() -> Self
fn sample_full() -> Self
A value carrying every field the type declares.
Source§fn sample_minimal() -> Self
fn sample_minimal() -> Self
A value carrying every optional field absent.
Source§fn sample_alternates() -> Vec<Self>
fn sample_alternates() -> Vec<Self>
One value per further arm, for a type whose wire form is a union. Read more
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