From c113d9b5a0fb6c86773c5e98f1afd46ce29e1aad Mon Sep 17 00:00:00 2001 From: Serguey Parkhomovsky Date: Tue, 17 Mar 2026 20:37:39 -0700 Subject: Restrict visibility of internal structs --- src/lib.rs | 68 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index aa05dd9..4891b42 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ pub struct PrinterState { #[derive(Debug, Deserialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] -pub enum PrusaState { +enum PrusaState { Idle, Printing, Paused, @@ -31,7 +31,7 @@ pub enum PrusaState { #[derive(Debug, Deserialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] -pub enum BambuState { +enum BambuState { Idle, Running, Pause, @@ -40,52 +40,52 @@ pub enum BambuState { } #[derive(Debug, Deserialize)] -pub struct PrusaJob { - pub id: u32, - pub progress: f32, - pub time_remaining: u32, - pub time_printing: u32, +struct PrusaJob { + id: u32, + progress: f32, + time_remaining: u32, + time_printing: u32, } #[derive(Debug, Deserialize)] -pub struct PrusaPrinterInfo { - pub state: PrusaState, - pub temp_nozzle: f32, - pub target_nozzle: f32, - pub temp_bed: f32, - pub target_bed: f32, - pub axis_x: f32, - pub axis_y: f32, - pub axis_z: f32, - pub flow: u32, - pub speed: u32, - pub fan_hotend: u32, - pub fan_print: u32, +struct PrusaPrinterInfo { + state: PrusaState, + temp_nozzle: f32, + target_nozzle: f32, + temp_bed: f32, + target_bed: f32, + axis_x: f32, + axis_y: f32, + axis_z: f32, + flow: u32, + speed: u32, + fan_hotend: u32, + fan_print: u32, } #[derive(Debug, Deserialize)] pub struct PrusaStatus { - pub job: Option, - pub printer: PrusaPrinterInfo, + job: Option, + printer: PrusaPrinterInfo, } #[derive(Deserialize)] -pub struct BambuPrintMessage { - pub bed_target_temper: Option, - pub bed_temper: Option, - pub gcode_state: Option, - pub layer_num: Option, - pub mc_percent: Option, - pub mc_remaining_time: Option, - pub nozzle_target_temper: Option, - pub nozzle_temper: Option, - pub print_speed: Option, - pub total_layer_num: Option, +struct BambuPrintMessage { + bed_target_temper: Option, + bed_temper: Option, + gcode_state: Option, + layer_num: Option, + mc_percent: Option, + mc_remaining_time: Option, + nozzle_target_temper: Option, + nozzle_temper: Option, + print_speed: Option, + total_layer_num: Option, } #[derive(Deserialize)] pub struct BambuStatus { - pub print: Option, + print: Option, } #[derive(Debug, Deserialize)] -- cgit v1.2.3