From 63eed6d8abdcb5d8304e5603e578225a2a1bf174 Mon Sep 17 00:00:00 2001 From: Cassandra de la Cruz-Munoz Date: Mon, 1 Jan 2024 13:50:01 -0500 Subject: [PATCH] create constructors for VmcExtSettingColor --- src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 0fa6bab..9b23766 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1480,7 +1480,7 @@ impl VmcExtOpt { } #[derive(Debug)] -struct VmcExtSettingColor { +pub struct VmcExtSettingColor { color: Color, } @@ -1524,6 +1524,18 @@ impl VmcMessage for VmcExtSettingColor { } } +impl VmcExtSettingColor { + pub fn new(color: Color) ->MsgNewResult { + Ok(Self{color}) + } + pub fn new_vmc_message(color: Color) -> TraitMsgNewResult { + match Self::new(color) { + Ok(val) => Ok(Box::new(val)), + Err(val) => Err(val), + } + } +} + #[derive(Debug)] struct VmcExtSettingWin { is_top_most: bool,