create constructors for VmcExtOpt

This commit is contained in:
Cassandra de la Cruz-Munoz 2024-01-01 13:48:02 -05:00
parent 22997061b6
commit efe25b28f1
Signed by: cassdlcm
GPG Key ID: BFEBACEA812DDA70

View File

@ -1438,7 +1438,7 @@ impl VmcExtRemote {
}
#[derive(Debug)]
struct VmcExtOpt {
pub struct VmcExtOpt {
option: String,
}
@ -1467,6 +1467,18 @@ impl VmcMessage for VmcExtOpt {
}
}
impl VmcExtOpt {
pub fn new(option: String) ->MsgNewResult<Self> {
Ok(Self { option })
}
pub fn new_vmc_message(option: String) -> TraitMsgNewResult {
match Self::new(option) {
Ok(val) => Ok(Box::new(val)),
Err(val) => Err(val)
}
}
}
#[derive(Debug)]
struct VmcExtSettingColor {
color: Color,