From d3a44717a99a920efe8446743f3a9040384c586b Mon Sep 17 00:00:00 2001 From: Cassandra de la Cruz-Munoz Date: Mon, 1 Jan 2024 13:54:34 -0500 Subject: [PATCH] create constructors for VmcExtConfig --- src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 04ef480..a82ba87 100644 --- a/src/lib.rs +++ b/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 { + 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),