create constructors for VmcExtLight
This commit is contained in:
parent
b59d0762d2
commit
311ec2552a
14
src/lib.rs
14
src/lib.rs
|
@ -1221,7 +1221,7 @@ impl VmcExtRvc {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct VmcExtLight {
|
pub struct VmcExtLight {
|
||||||
name: String,
|
name: String,
|
||||||
transform: Transform3D,
|
transform: Transform3D,
|
||||||
color: Color,
|
color: Color,
|
||||||
|
@ -1315,6 +1315,18 @@ impl VmcMessage for VmcExtLight {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl VmcExtLight {
|
||||||
|
pub fn new(name: String, transform: Transform3D, color: Color) ->MsgNewResult<Self> {
|
||||||
|
Ok(Self { name, transform, color})
|
||||||
|
}
|
||||||
|
pub fn new_vmc_message(name: String, transform: Transform3D, color: Color) ->TraitMsgNewResult {
|
||||||
|
match Self::new(name, transform, color) {
|
||||||
|
Ok(val) => Ok(Box::new(val)),
|
||||||
|
Err(val) => Err(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct VmcExtVrm {
|
struct VmcExtVrm {
|
||||||
path: String,
|
path: String,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user