(reader: &mut R)
| 150 | |
| 151 | impl<'a> Decode<'a> for Document { |
| 152 | fn decode<R: Reader<'a>>(reader: &mut R) -> Result<Document> { |
| 153 | let header = reader.peek_header()?; |
| 154 | let length = (header.encoded_len()? + header.length)?; |
| 155 | let bytes = reader.read_slice(length)?; |
| 156 | |
| 157 | Ok(Self { |
| 158 | der_bytes: bytes.into(), |
| 159 | length, |
| 160 | }) |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | impl Encode for Document { |
nothing calls this directly
no test coverage detected