(value: i16)
| 30 | type Error = io::Error; |
| 31 | |
| 32 | fn try_from(value: i16) -> Result<Self, Self::Error> { |
| 33 | match value { |
| 34 | 0 => Ok(Format::Text), |
| 35 | 1 => Ok(Format::Binary), |
| 36 | n => Err(input_err(format!("unknown format code: {}", n))), |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | impl From<Format> for i8 { |
nothing calls this directly
no test coverage detected