(&mut self, input: &mut &'a [u8], length: usize)
| 72 | |
| 73 | impl<'a, T: Decode<'a>, E: Decode<'a>> View<'a> for ResultDecoder<'a, T, E> { |
| 74 | fn populate(&mut self, input: &mut &'a [u8], length: usize) -> Result<(), Error> { |
| 75 | self.variants.populate(input, length)?; |
| 76 | self.ok.populate(input, self.variants.length(0))?; |
| 77 | self.err.populate(input, self.variants.length(1)) |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | impl<'a, T: Decode<'a>, E: Decode<'a>> Decoder<'a, Result<T, E>> for ResultDecoder<'a, T, E> { |