(encoded_speed: c::speed_t)
| 842 | all(linux_kernel, any(target_arch = "powerpc", target_arch = "powerpc64")) |
| 843 | )))] |
| 844 | pub(crate) const fn decode(encoded_speed: c::speed_t) -> Option<u32> { |
| 845 | match encoded_speed { |
| 846 | c::B0 => Some(0), |
| 847 | c::B50 => Some(50), |
| 848 | c::B75 => Some(75), |
| 849 | c::B110 => Some(110), |
| 850 | c::B134 => Some(134), |
| 851 | c::B150 => Some(150), |
| 852 | c::B200 => Some(200), |
| 853 | c::B300 => Some(300), |
| 854 | c::B600 => Some(600), |
| 855 | c::B1200 => Some(1200), |
| 856 | c::B1800 => Some(1800), |
| 857 | c::B2400 => Some(2400), |
| 858 | c::B4800 => Some(4800), |
| 859 | c::B9600 => Some(9600), |
| 860 | c::B19200 => Some(19200), |
| 861 | c::B38400 => Some(38400), |
| 862 | #[cfg(not(target_os = "aix"))] |
| 863 | c::B57600 => Some(57600), |
| 864 | #[cfg(not(target_os = "aix"))] |
| 865 | c::B115200 => Some(115_200), |
| 866 | #[cfg(not(any(target_os = "aix", target_os = "nto")))] |
| 867 | c::B230400 => Some(230_400), |
| 868 | #[cfg(not(any( |
| 869 | apple, |
| 870 | target_os = "aix", |
| 871 | target_os = "dragonfly", |
| 872 | target_os = "haiku", |
| 873 | target_os = "nto", |
| 874 | target_os = "openbsd" |
| 875 | )))] |
| 876 | c::B460800 => Some(460_800), |
| 877 | #[cfg(not(any( |
| 878 | bsd, |
| 879 | solarish, |
| 880 | target_os = "aix", |
| 881 | target_os = "haiku", |
| 882 | target_os = "nto" |
| 883 | )))] |
| 884 | c::B500000 => Some(500_000), |
| 885 | #[cfg(not(any( |
| 886 | bsd, |
| 887 | solarish, |
| 888 | target_os = "aix", |
| 889 | target_os = "haiku", |
| 890 | target_os = "nto" |
| 891 | )))] |
| 892 | c::B576000 => Some(576_000), |
| 893 | #[cfg(not(any( |
| 894 | apple, |
| 895 | target_os = "aix", |
| 896 | target_os = "dragonfly", |
| 897 | target_os = "haiku", |
| 898 | target_os = "nto", |
| 899 | target_os = "openbsd" |
| 900 | )))] |
| 901 | c::B921600 => Some(921_600), |
no outgoing calls
no test coverage detected