create constructors for VmcExtConfig
This commit is contained in:
parent
971d6c9455
commit
d3a44717a9
14
src/lib.rs
14
src/lib.rs
|
@ -1624,7 +1624,7 @@ impl VmcExtSettingWin {
|
|||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct VmcExtConfig {
|
||||
pub struct VmcExtConfig {
|
||||
path: String,
|
||||
}
|
||||
|
||||
|
@ -1651,6 +1651,18 @@ impl VmcMessage for VmcExtConfig {
|
|||
}
|
||||
}
|
||||
|
||||
impl VmcExtConfig {
|
||||
pub fn new(path: String) -> MsgNewResult<Self> {
|
||||
Ok(Self { path })
|
||||
}
|
||||
pub fn new_vmc_message(path: String) -> TraitMsgNewResult {
|
||||
match Self::new(path) {
|
||||
Ok(val) => Ok(Box::new(val)),
|
||||
Err(val) => Err(val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
enum ThruType {
|
||||
Float(f32),
|
||||
|
|
Loading…
Reference in New Issue
Block a user