Encodes and attempts to write the enum value into the Write. Currently we encode variant types as a tuple of id with array of args, like: [id, [args...]]
(&mut self, _name: &str, f: F)
| 1068 | /// |
| 1069 | /// Currently we encode variant types as a tuple of id with array of args, like: [id, [args...]] |
| 1070 | fn emit_enum<F>(&mut self, _name: &str, f: F) -> Result<(), Error> |
| 1071 | where F: FnOnce(&mut Self) -> Result<(), Error> |
| 1072 | { |
| 1073 | // Mark that we want to encode a variant type. |
| 1074 | try!(write_array_len(&mut self.wr, 2)); |
| 1075 | |
| 1076 | // Delegate to the encoder of a concrete value. |
| 1077 | f(self) |
| 1078 | } |
| 1079 | |
| 1080 | /// Encodes and attempts to write a concrete variant value. |
| 1081 | fn emit_enum_variant<F>(&mut self, _name: &str, id: usize, len: usize, f: F) -> Result<(), Error> |
nothing calls this directly
no test coverage detected