2018-12-31 20:36:59 -06:00
|
|
|
use serde_derive::Serialize;
|
2017-04-09 12:59:54 -05:00
|
|
|
|
|
|
|
mod remote {
|
|
|
|
pub struct S {
|
|
|
|
a: u8,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl S {
|
|
|
|
pub fn get(&self) -> u16 {
|
|
|
|
self.a as u16
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-03 00:19:39 -05:00
|
|
|
#[derive(Serialize)]
|
2017-04-09 12:59:54 -05:00
|
|
|
#[serde(remote = "remote::S")]
|
|
|
|
struct S {
|
|
|
|
#[serde(getter = "remote::S::get")]
|
2018-06-03 00:19:39 -05:00
|
|
|
a: u8,
|
2017-04-09 12:59:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|