Struct rustix::termios::Termios

source ·
#[repr(C)]
pub struct Termios { pub input_modes: InputModes, pub output_modes: OutputModes, pub control_modes: ControlModes, pub local_modes: LocalModes, pub line_discipline: cc_t, pub special_codes: SpecialCodes, /* private fields */ }
Expand description

struct termios for use with tcgetattr and tcsetattr.

Fields§

§input_modes: InputModes

How is input interpreted?

§output_modes: OutputModes

How is output translated?

§control_modes: ControlModes

Low-level configuration flags.

§local_modes: LocalModes

High-level configuration flags.

§line_discipline: cc_t

Line discipline.

§special_codes: SpecialCodes

How are various special control codes handled?

Implementations§

cfmakeraw(self)—Set a Termios value to the settings for “raw” mode.

In raw mode, input is available a byte at a time, echoing is disabled, and special terminal input and output codes are disabled.

Return the input communication speed.

Unlike the c_ispeed field in GLIBC and others, this returns the integer value of the speed, rather than the B* encoded constant value.

Return the output communication speed.

Unlike the c_ospeed field in GLIBC and others, this returns the arbitrary integer value of the speed, rather than the B* encoded constant value.

Set the input and output communication speeds.

Unlike the c_ispeed and c_ospeed fields in GLIBC and others, this takes the arbitrary integer value of the speed, rather than the B* encoded constant value. Not all implementations support all integer values; use the constants in the speed module for likely-supported speeds.

Set the input communication speed.

Unlike the c_ispeed field in GLIBC and others, this takes the arbitrary integer value of the speed, rather than the B* encoded constant value. Not all implementations support all integer values; use the constants in the speed module for known-supported speeds.

On some platforms, changing the input speed changes the output speed to the same speed.

Set the output communication speed.

Unlike the c_ospeed field in GLIBC and others, this takes the arbitrary integer value of the speed, rather than the B* encoded constant value. Not all implementations support all integer values; use the constants in the speed module for known-supported speeds.

On some platforms, changing the output speed changes the input speed to the same speed.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.