create constructors for VmcExtSetConfig
This commit is contained in:
parent
e772c9e817
commit
336f9435fb
14
src/lib.rs
14
src/lib.rs
|
@ -1939,7 +1939,7 @@ impl VmcExtSetCalibExec {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct VmcExtSetConfig {
|
pub struct VmcExtSetConfig {
|
||||||
path: String
|
path: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1963,6 +1963,18 @@ impl VmcMessage for VmcExtSetConfig {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl VmcExtSetConfig {
|
||||||
|
pub fn new(path: String) -> MsgNewResult<Self> {
|
||||||
|
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(Debug)]
|
#[derive(Debug)]
|
||||||
struct VmcMessageNoArgs {
|
struct VmcMessageNoArgs {
|
||||||
addr: String
|
addr: String
|
||||||
|
|
Loading…
Reference in New Issue
Block a user