#[repr(C)]pub struct KernelTermios {
pub c_iflag: u32,
pub c_oflag: u32,
pub c_cflag: u32,
pub c_lflag: u32,
pub c_line: u8,
pub c_cc: [u8; 32],
pub c_ispeed: u32,
pub c_ospeed: u32,
}Expand description
Linux struct termios layout (60 bytes).
Field order MUST match the kernel ABI that musl’s TCGETS/TCSETS expect:
c_iflag(4), c_oflag(4), c_cflag(4), c_lflag(4), c_line(1),
c_cc32, pad(3), c_ispeed(4), c_ospeed(4).
The c_line field is required – without it, c_cc starts at the wrong
offset and musl reads corrupted control characters.
Fields§
§c_iflag: u32§c_oflag: u32§c_cflag: u32§c_lflag: u32§c_line: u8§c_cc: [u8; 32]§c_ispeed: u32§c_ospeed: u32Implementations§
Source§impl KernelTermios
impl KernelTermios
Sourcepub const fn default_console() -> Self
pub const fn default_console() -> Self
Create default terminal attributes (cooked mode, echo on).
These match the standard POSIX defaults for a serial console: canonical mode, echo enabled, signal processing on.
Sourcepub fn is_canonical(&self) -> bool
pub fn is_canonical(&self) -> bool
Check if canonical (line-buffered) mode is enabled.
Trait Implementations§
Source§impl Clone for KernelTermios
impl Clone for KernelTermios
Source§fn clone(&self) -> KernelTermios
fn clone(&self) -> KernelTermios
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KernelTermios
Auto Trait Implementations§
impl Freeze for KernelTermios
impl RefUnwindSafe for KernelTermios
impl Send for KernelTermios
impl Sync for KernelTermios
impl Unpin for KernelTermios
impl UnwindSafe for KernelTermios
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)