⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

KernelTermios

Struct KernelTermios 

Source
#[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: u32

Implementations§

Source§

impl KernelTermios

Source

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.

Source

pub fn is_canonical(&self) -> bool

Check if canonical (line-buffered) mode is enabled.

Source

pub fn is_echo(&self) -> bool

Check if echo is enabled.

Source

pub fn vmin(&self) -> u8

Get the VMIN value (minimum characters for non-canonical read).

Source

pub fn vtime(&self) -> u8

Get the VTIME value (timeout for non-canonical read, in tenths of a second).

Source

pub fn verase(&self) -> u8

Get the erase character (typically DEL or backspace).

Source

pub fn vkill(&self) -> u8

Get the kill character (typically Ctrl-U).

Source

pub fn veof(&self) -> u8

Get the EOF character (typically Ctrl-D).

Trait Implementations§

Source§

impl Clone for KernelTermios

Source§

fn clone(&self) -> KernelTermios

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl 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 T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.