Convert Encoding to u8 for storage.
(encoding: Option<&Encoding>)
| 828 | |
| 829 | /// Convert Encoding to u8 for storage. |
| 830 | fn encoding_to_u8(encoding: Option<&Encoding>) -> u8 { |
| 831 | match encoding { |
| 832 | None => 0, |
| 833 | Some(Encoding::Utf8) => 1, |
| 834 | Some(Encoding::Utf16Le) => 2, |
| 835 | Some(Encoding::Utf16Be) => 3, |
| 836 | Some(Encoding::Binary) => 4, |
| 837 | Some(Encoding::Latin1) => 5, |
| 838 | } |
| 839 | } |
| 840 | |
| 841 | // Low-Level Table Operations |
| 842 |
no outgoing calls
no test coverage detected