Deserializes a value of type `ty` from `raw` using the specified `format`.
(
format: Format,
ty: &Type,
raw: &[u8],
)
| 653 | /// Deserializes a value of type `ty` from `raw` using the specified |
| 654 | /// `format`. |
| 655 | pub fn decode( |
| 656 | format: Format, |
| 657 | ty: &Type, |
| 658 | raw: &[u8], |
| 659 | ) -> Result<Value, Box<dyn Error + Sync + Send>> { |
| 660 | match format { |
| 661 | Format::Text => Value::decode_text(ty, raw), |
| 662 | Format::Binary => Value::decode_binary(ty, raw), |
| 663 | } |
| 664 | } |
| 665 | |
| 666 | /// Deserializes a value of type `ty` from `raw` using the [text encoding |
| 667 | /// format](Format::Text). |
no outgoing calls
no test coverage detected