(&self, f: &mut core::fmt::Formatter<'_>)
| 212 | |
| 213 | impl core::fmt::Debug for Termios { |
| 214 | fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { |
| 215 | let mut d = f.debug_struct("Termios"); |
| 216 | d.field("input_modes", &self.input_modes); |
| 217 | d.field("output_modes", &self.output_modes); |
| 218 | |
| 219 | // This includes any bits set in the `CBAUD` and `CIBAUD` ranges, which |
| 220 | // is a little ugly, because we also decode those bits for the speeds |
| 221 | // below. However, it seems better to print them here than to hide |
| 222 | // them, because hiding them would make the `Termios` debug output |
| 223 | // appear to disagree with the `ControlModes` debug output for the same |
| 224 | // value, which could be confusing. |
| 225 | d.field("control_modes", &self.control_modes); |
| 226 | |
| 227 | d.field("local_modes", &self.local_modes); |
| 228 | #[cfg(any( |
| 229 | linux_like, |
| 230 | target_env = "newlib", |
| 231 | target_os = "fuchsia", |
| 232 | target_os = "haiku", |
| 233 | target_os = "redox" |
| 234 | ))] |
| 235 | { |
| 236 | d.field("line_discipline", &SpecialCode(self.line_discipline)); |
| 237 | } |
| 238 | d.field("special_codes", &self.special_codes); |
| 239 | d.field("input_speed", &self.input_speed()); |
| 240 | d.field("output_speed", &self.output_speed()); |
| 241 | d.finish() |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | bitflags! { |
nothing calls this directly
no test coverage detected