use std::collections::{HashMap, BTreeMap}; use from_remote_derive::FromRemote; #[derive(FromRemote)] #[from_remote("Bar", "Pook")] struct Foo { bar: BTreeMap, fizz: Vec, } struct Bar { bar: BTreeMap, fizz: Vec, } struct Pook { bar: BTreeMap, fizz: Vec, } #[derive(FromRemote)] #[from_remote("Buzz")] enum Fizz { A(u64, Option), B(HashMap), C(Foo), D { x: u16, y: u32, }, } enum Buzz { A(u64, Option), B(HashMap), C(Bar), D { x: u16, y: u32, }, } fn main() {}