create constructors for VmcExtSetEye
This commit is contained in:
parent
f24d788950
commit
43635f599f
14
src/lib.rs
14
src/lib.rs
|
@ -1799,7 +1799,7 @@ impl VmcExtSetPeriod {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct VmcExtSetEye {
|
pub struct VmcExtSetEye {
|
||||||
enable: i32,
|
enable: i32,
|
||||||
position: Vector3,
|
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)]
|
#[derive(Debug)]
|
||||||
struct VmcExtSetRes {
|
struct VmcExtSetRes {
|
||||||
response: String
|
response: String
|
||||||
|
|
Loading…
Reference in New Issue
Block a user