create constructors for VmcExtVrm
This commit is contained in:
parent
311ec2552a
commit
b378685712
14
src/lib.rs
14
src/lib.rs
|
@ -1328,7 +1328,7 @@ impl VmcExtLight {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct VmcExtVrm {
|
pub struct VmcExtVrm {
|
||||||
path: String,
|
path: String,
|
||||||
title: String,
|
title: String,
|
||||||
hash: Option<String>,
|
hash: Option<String>,
|
||||||
|
@ -1376,6 +1376,18 @@ impl VmcMessage for VmcExtVrm {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl VmcExtVrm {
|
||||||
|
pub fn new(path: String, title: String, hash: Option<String>) ->MsgNewResult<Self> {
|
||||||
|
Ok(Self { path, title, hash})
|
||||||
|
}
|
||||||
|
pub fn new_vmc_message(path: String, title: String, hash: Option<String>) ->TraitMsgNewResult {
|
||||||
|
match Self::new(path, title, hash) {
|
||||||
|
Ok(val) => Ok(Box::new(val)),
|
||||||
|
Err(val) => Err(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct VmcExtRemote {
|
struct VmcExtRemote {
|
||||||
service: String,
|
service: String,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user