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<JobError>,
pub file_position_bytes: Option<i64>,
pub filament: Vec<ToolFilament>,
}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<JobError>The error the source reports, when it reports one, and whose it is.
file_position_bytes: Option<i64>How far into the file the printer has read, in bytes, when the source reported it.
filament: Vec<ToolFilament>The filament the source’s analysis of the file says each tool uses; empty when the source reported none.
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>,
Source§impl JsonSchema for JobSnapshot
impl JsonSchema for JobSnapshot
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more