Convert Encoding to u8 for storage.
(encoding: Option<&Encoding>)
| 971 | |
| 972 | /// Convert Encoding to u8 for storage. |
| 973 | fn encoding_to_u8(encoding: Option<&Encoding>) -> u8 { |
| 974 | match encoding { |
| 975 | None => 0, |
| 976 | Some(Encoding::Utf8) => 1, |
| 977 | Some(Encoding::Utf16Le) => 2, |
| 978 | Some(Encoding::Utf16Be) => 3, |
| 979 | Some(Encoding::Binary) => 4, |
| 980 | Some(Encoding::Latin1) => 5, |
| 981 | } |
| 982 | } |
| 983 | |
| 984 | // Low-Level Table Operations |
| 985 |
no outgoing calls
no test coverage detected