pub struct LineDiscipline {
pub locked: bool,
pub stopped: bool,
pub window_size: winsize,
/* private fields */
}Fields§
§locked: bool|true| is the terminal is locked.
stopped: bool|true| if the output is stopped (due to IXON).
window_size: winsizeTerminal size.
Implementations§
Source§impl LineDiscipline
impl LineDiscipline
pub fn is_canon_enabled(&self) -> bool
Sourcepub fn get_available_read_size(&self, is_main: bool) -> usize
pub fn get_available_read_size(&self, is_main: bool) -> usize
Returns the number of available bytes to read from the side of the terminal described by
is_main.
Sourcepub fn set_termios(&mut self, termios: termios) -> PendingSignals
pub fn set_termios(&mut self, termios: termios) -> PendingSignals
Sets the terminal configuration.
Sourcepub fn main_close(&mut self)
pub fn main_close(&mut self)
close implementation of the main side of the terminal.
Sourcepub fn main_open(&mut self)
pub fn main_open(&mut self)
Called when a new reference to the main side of this terminal is made.
pub fn is_main_closed(&self) -> bool
Sourcepub fn main_query_events(&self) -> FdEvents
pub fn main_query_events(&self) -> FdEvents
query_events implementation of the main side of the terminal.
Sourcepub fn main_read(&mut self, data: &mut dyn OutputBuffer) -> Result<usize, Errno>
pub fn main_read(&mut self, data: &mut dyn OutputBuffer) -> Result<usize, Errno>
read implementation of the main side of the terminal.
Sourcepub fn main_write(
&mut self,
data: &mut dyn InputBuffer,
) -> Result<(usize, PendingSignals), Errno>
pub fn main_write( &mut self, data: &mut dyn InputBuffer, ) -> Result<(usize, PendingSignals), Errno>
write implementation of the main side of the terminal.
Sourcepub fn replica_close(&mut self)
pub fn replica_close(&mut self)
close implementation of the replica side of the terminal.
Sourcepub fn replica_open(&mut self)
pub fn replica_open(&mut self)
Called when a new reference to the replica side of this terminal is made.
pub fn is_replica_closed(&self) -> bool
Sourcepub fn replica_query_events(&self) -> FdEvents
pub fn replica_query_events(&self) -> FdEvents
query_events implementation of the replica side of the terminal.
Sourcepub fn replica_read(
&mut self,
data: &mut dyn OutputBuffer,
) -> Result<usize, Errno>
pub fn replica_read( &mut self, data: &mut dyn OutputBuffer, ) -> Result<usize, Errno>
read implementation of the replica side of the terminal.
Sourcepub fn replica_write(
&mut self,
data: &mut dyn InputBuffer,
) -> Result<usize, Errno>
pub fn replica_write( &mut self, data: &mut dyn InputBuffer, ) -> Result<usize, Errno>
write implementation of the replica side of the terminal.
Trait Implementations§
Source§impl Debug for LineDiscipline
impl Debug for LineDiscipline
Auto Trait Implementations§
impl Freeze for LineDiscipline
impl RefUnwindSafe for LineDiscipline
impl Send for LineDiscipline
impl Sync for LineDiscipline
impl Unpin for LineDiscipline
impl UnwindSafe for LineDiscipline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more