diff --git a/server/notifyserver/src/main.rs b/server/notifyserver/src/main.rs old mode 100644 new mode 100755 index eb9f8b1..8587098 --- a/server/notifyserver/src/main.rs +++ b/server/notifyserver/src/main.rs @@ -1,13 +1,48 @@ +use std::rc::Rc; + use r9; mod test; +mod mt; + + +pub enum MessagesUnion +{ + XValue(Rc::), + f2(mt::TxKeyConf) +} type XValue = r9::XValue::; +type MetaMgr = r9::MetaMgr::; +macro_rules! getMeta { + ($metamgr:expr, $ty:ident, $idx:expr) => { + //if let Some(v) = $metamgr.get_byid(0, $idx) { + if 1 > 1 { + /*if let MessagesUnion::$ty(v1) = &(**v) { + //Option::<&Rc::<$ty>>::Some(v1); + Option::<&Rc::<$ty>>::None; + } else { + Option::<&Rc::<$ty>>::None; + }*/ + Option::<&Rc::<$ty>>::None; + } else { + Option::<&Rc::<$ty>>::None; + } + //Option::<&Rc::<$ty>>::None; + } +} fn main() { - let mut a = XValue::new(); - a.set_i64(2000); - test::hello(&a); -// println!("Hello, world!{}", a.get_i64()); + let mut metamgr = MetaMgr::new(); + //let b = getMeta!(metamgr, XValue, 0); + let b: Option::<&Rc::> = getMeta!(metamgr, XValue, 0); + /*match b { + Some(v) => { + v.get_i64(); + } + None => { + + } + }*/ } diff --git a/third_party/r9 b/third_party/r9 index 1d17503..374a63d 160000 --- a/third_party/r9 +++ b/third_party/r9 @@ -1 +1 @@ -Subproject commit 1d17503122c192d2135cb9be60eeacd7750c8768 +Subproject commit 374a63d8e08659c1b9ba457421450c24fe3cf3c0