create constructors for VmcExtSetEye

This commit is contained in:
Cassandra de la Cruz-Munoz 2024-01-01 14:03:25 -05:00
parent f24d788950
commit 43635f599f
Signed by: cassdlcm
GPG Key ID: BFEBACEA812DDA70

View File

@ -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<Self> {
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