1
This commit is contained in:
parent
06f9371a72
commit
35c51e6acd
43
server/notifyserver/src/main.rs
Normal file → Executable file
43
server/notifyserver/src/main.rs
Normal file → Executable file
@ -1,13 +1,48 @@
|
||||
use std::rc::Rc;
|
||||
|
||||
use r9;
|
||||
|
||||
mod test;
|
||||
mod mt;
|
||||
|
||||
|
||||
pub enum MessagesUnion
|
||||
{
|
||||
XValue(Rc::<XValue>),
|
||||
f2(mt::TxKeyConf)
|
||||
}
|
||||
|
||||
type XValue = r9::XValue::<test::App>;
|
||||
type MetaMgr = r9::MetaMgr::<MessagesUnion>;
|
||||
|
||||
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::<XValue>> = getMeta!(metamgr, XValue, 0);
|
||||
/*match b {
|
||||
Some(v) => {
|
||||
v.get_i64();
|
||||
}
|
||||
None => {
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
2
third_party/r9
vendored
2
third_party/r9
vendored
@ -1 +1 @@
|
||||
Subproject commit 1d17503122c192d2135cb9be60eeacd7750c8768
|
||||
Subproject commit 374a63d8e08659c1b9ba457421450c24fe3cf3c0
|
Loading…
x
Reference in New Issue
Block a user