From b3786857123e735ae6f885763386a90a726429b0 Mon Sep 17 00:00:00 2001 From: Cassandra de la Cruz-Munoz Date: Mon, 1 Jan 2024 13:44:17 -0500 Subject: [PATCH] create constructors for VmcExtVrm --- src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 90cfa7c..d862028 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1328,7 +1328,7 @@ impl VmcExtLight { } #[derive(Debug)] -struct VmcExtVrm { +pub struct VmcExtVrm { path: String, title: String, hash: Option, @@ -1376,6 +1376,18 @@ impl VmcMessage for VmcExtVrm { } } +impl VmcExtVrm { + pub fn new(path: String, title: String, hash: Option) ->MsgNewResult { + Ok(Self { path, title, hash}) + } + pub fn new_vmc_message(path: String, title: String, hash: Option) ->TraitMsgNewResult { + match Self::new(path, title, hash) { + Ok(val) => Ok(Box::new(val)), + Err(val) => Err(val) + } + } +} + #[derive(Debug)] struct VmcExtRemote { service: String,