create constructors for VmcExtRemote

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

View File

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