use serde::{Deserialize, Serialize}; #[derive(Serialize)] struct SerNamedMap<'a, 'b, A: 'a, B: 'b, C> { a: &'a A, b: &'b mut B, c: C, } #[derive(Deserialize)] struct DeNamedMap { a: A, b: B, c: C, }