create constructors for VmcExtRemote
This commit is contained in:
parent
b378685712
commit
22997061b6
14
src/lib.rs
14
src/lib.rs
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user