pub struct PtyManager { /* private fields */ }Implementations§
Source§impl PtyManager
impl PtyManager
pub fn new() -> Self
pub fn with_signal_handler(on_signal: SignalHandler) -> Self
pub fn create_pty(&self) -> PtyPair
pub fn create_pty_fds( &self, fd_table: &mut ProcessFdTable, ) -> FdResult<(u32, u32, String)>
pub fn poll( &self, description_id: u64, requested: PollEvents, ) -> PtyResult<PollEvents>
pub fn write( &self, description_id: u64, data: impl AsRef<[u8]>, ) -> PtyResult<usize>
pub fn read( &self, description_id: u64, length: usize, ) -> PtyResult<Option<Vec<u8>>>
pub fn read_with_timeout( &self, description_id: u64, length: usize, timeout: Option<Duration>, ) -> PtyResult<Option<Vec<u8>>>
pub fn close(&self, description_id: u64)
pub fn is_pty(&self, description_id: u64) -> bool
pub fn is_slave(&self, description_id: u64) -> bool
pub fn set_discipline( &self, description_id: u64, config: LineDisciplineConfig, ) -> PtyResult<()>
pub fn get_termios(&self, description_id: u64) -> PtyResult<Termios>
pub fn set_termios( &self, description_id: u64, termios: PartialTermios, ) -> PtyResult<()>
pub fn set_foreground_pgid( &self, description_id: u64, pgid: u32, ) -> PtyResult<()>
pub fn get_foreground_pgid(&self, description_id: u64) -> PtyResult<u32>
pub fn resize( &self, description_id: u64, cols: u16, rows: u16, ) -> PtyResult<Option<u32>>
pub fn pty_count(&self) -> usize
pub fn buffered_input_bytes(&self) -> usize
pub fn buffered_output_bytes(&self) -> usize
pub fn pending_read_waiter_count(&self) -> usize
pub fn queued_read_waiter_count(&self) -> usize
pub fn path_for(&self, description_id: u64) -> Option<String>
Trait Implementations§
Source§impl Clone for PtyManager
impl Clone for PtyManager
Source§fn clone(&self) -> PtyManager
fn clone(&self) -> PtyManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PtyManager
impl !UnwindSafe for PtyManager
impl Freeze for PtyManager
impl Send for PtyManager
impl Sync for PtyManager
impl Unpin for PtyManager
impl UnsafeUnpin for PtyManager
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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