1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
//! Literal code segments use Loc; #[derive(Debug, Clone, Serialize)] #[serde(tag = "type", rename_all = "snake_case")] pub enum RpContext { Csharp {}, Go {}, Java { /// Imports to perform for the given code block. /// These will be de-duplicated by the java backend. imports: Vec<Loc<String>>, }, Js {}, Json {}, Python {}, Reproto {}, Rust {}, Swift {}, } #[derive(Debug, Clone, Serialize)] pub struct RpCode { pub context: RpContext, pub lines: Vec<String>, }