create constructors for VmcExtConfig

This commit is contained in:
Cassandra de la Cruz-Munoz 2024-01-01 13:54:34 -05:00
parent 971d6c9455
commit d3a44717a9
Signed by: cassdlcm
GPG Key ID: BFEBACEA812DDA70

View File

@ -1624,7 +1624,7 @@ impl VmcExtSettingWin {
} }
#[derive(Debug)] #[derive(Debug)]
struct VmcExtConfig { pub struct VmcExtConfig {
path: String, 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)] #[derive(Clone, Copy, Debug)]
enum ThruType { enum ThruType {
Float(f32), Float(f32),