diff --git a/src/lib.rs b/src/lib.rs index 8e90f3d..a2979e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -113,7 +113,7 @@ pub enum MessageCreationErr { } #[derive(Debug)] -struct VmcExtOk { +pub struct VmcExtOk { loaded: i32, calibration_state: Option, calibration_mode: Option, @@ -203,7 +203,7 @@ impl VmcMessage for VmcExtOk { } impl VmcExtOk { - fn new(loaded: i32, calibration_state: Option, calibration_mode: Option, tracking_status: Option) -> Result { + pub fn new(loaded: i32, calibration_state: Option, calibration_mode: Option, tracking_status: Option) -> Result { if loaded < 0 || loaded > 1 { return Err(MessageCreationErr::IntRange(CreateIntRangeErr { expected_lower: 0, expected_upper: 1, actual: loaded, calling_func: String::from("VmcExtOk::new"), arg_name: String::from("loaded")})); } @@ -236,7 +236,7 @@ impl VmcExtOk { } return Ok(Self { loaded, calibration_state: None, calibration_mode: None, tracking_status: None}) } - fn new_vmc_message(loaded: i32, calibration_state: Option, calibration_mode: Option, tracking_status: Option) -> Result, MessageCreationErr> { + pub fn new_vmc_message(loaded: i32, calibration_state: Option, calibration_mode: Option, tracking_status: Option) -> Result, MessageCreationErr> { let msg = Self::new(loaded, calibration_state, calibration_mode, tracking_status); if msg.is_ok() { let boxed_result: Box = Box::new(msg.ok().unwrap()); @@ -247,7 +247,7 @@ impl VmcExtOk { } #[derive(Debug)] -struct VmcExtT { +pub struct VmcExtT { time: f32, } @@ -276,10 +276,10 @@ impl VmcMessage for VmcExtT { } impl VmcExtT { - fn new(time: f32) -> Result { + pub fn new(time: f32) -> Result { return Ok(Self { time }); } - fn new_vmc_message(time: f32) -> Result, MessageCreationErr> { + pub fn new_vmc_message(time: f32) -> Result, MessageCreationErr> { let msg = Self::new(time); if msg.is_ok() { let boxed_result: Box = Box::new(msg.ok().unwrap()); @@ -290,7 +290,7 @@ impl VmcExtT { } #[derive(Debug)] -struct VmcExtRootPos { +pub struct VmcExtRootPos { name: String, transform: Transform3D, mr_scale: Option, @@ -420,7 +420,7 @@ impl VmcMessage for VmcExtRootPos { } impl VmcExtRootPos { - fn new(name: String, transform: Transform3D, mr_scale: Option, mr_offset: Option) -> Result { + pub fn new(name: String, transform: Transform3D, mr_scale: Option, mr_offset: Option) -> Result { if mr_scale.is_some() && mr_offset.is_none() { return Err(MessageCreationErr::OptionalArgs(CreateOptionalArgsErr { expected_sets: vec![String::from("None"), String::from("mr_scale, mr_offset")], actual: String::from("mr_scale"), calling_func: String::from("VmcExtRootPos::new")})); } @@ -429,7 +429,7 @@ impl VmcExtRootPos { } return Ok(Self { name, transform, mr_scale, mr_offset}); } - fn new_vmc_message(name: String, transform: Transform3D, mr_scale: Option, mr_offset: Option) -> Result, MessageCreationErr> { + pub fn new_vmc_message(name: String, transform: Transform3D, mr_scale: Option, mr_offset: Option) -> Result, MessageCreationErr> { let message = Self::new(name, transform, mr_scale, mr_offset); if message.is_ok() { let boxed_result: Box = Box::new(message.ok().unwrap()); @@ -440,7 +440,7 @@ impl VmcExtRootPos { } #[derive(Debug)] -struct VmcExtBonePos { +pub struct VmcExtBonePos { name: String, transform: Transform3D, } @@ -518,10 +518,10 @@ impl VmcMessage for VmcExtBonePos { } impl VmcExtBonePos { - fn new(name: String, transform: Transform3D) -> Result { + pub fn new(name: String, transform: Transform3D) -> Result { return Ok(Self{name, transform}); } - fn new_vmc_message(name: String, transform: Transform3D) -> Result, MessageCreationErr> { + pub fn new_vmc_message(name: String, transform: Transform3D) -> Result, MessageCreationErr> { let message = Self::new(name, transform); if message.is_ok() { let boxed_result: Box = Box::new(message.ok().unwrap()); @@ -532,7 +532,7 @@ impl VmcExtBonePos { } #[derive(Debug)] -struct VmcExtBlendVal { +pub struct VmcExtBlendVal { name: String, value: f32, } @@ -570,10 +570,10 @@ impl VmcMessage for VmcExtBlendVal { } impl VmcExtBlendVal { - fn new(name: String, value: f32) -> Result { + pub fn new(name: String, value: f32) -> Result { return Ok(Self{name, value}); } - fn new_vmc_message(name: String, value: f32) -> Result, MessageCreationErr> { + pub fn new_vmc_message(name: String, value: f32) -> Result, MessageCreationErr> { let message = Self::new(name, value); if message.is_ok() { let boxed_result: Box = Box::new(message.ok().unwrap());