From 43635f599f47efe634e2cb352dededb397453aa9 Mon Sep 17 00:00:00 2001 From: Cassandra de la Cruz-Munoz Date: Mon, 1 Jan 2024 14:03:25 -0500 Subject: [PATCH] create constructors for VmcExtSetEye --- src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index d699b10..c1f18af 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1799,7 +1799,7 @@ impl VmcExtSetPeriod { } #[derive(Debug)] -struct VmcExtSetEye { +pub struct VmcExtSetEye { enable: i32, position: Vector3, } @@ -1846,6 +1846,18 @@ impl VmcMessage for VmcExtSetEye { } } +impl VmcExtSetEye { + pub fn new(enable: i32, position: Vector3) ->MsgNewResult { + Ok(Self { enable, position}) + } + pub fn new_vmc_message(enable: i32, position: Vector3) -> TraitMsgNewResult { + match Self::new(enable, position) { + Ok(val) => Ok(Box::new(val)), + Err(val) => Err(val) + } + } +} + #[derive(Debug)] struct VmcExtSetRes { response: String