File size: 311 Bytes
81568be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::io::{Read, Write};

#[cfg(unix)]
pub mod unix;

#[cfg(windows)]
pub mod windows;

#[cfg(unix)]
pub use unix::Pty;
#[cfg(windows)]
pub use windows::Pty;

pub trait PtyTrait: Read + Write + Send {
    fn resize(&mut self, cols: u16, rows: u16) -> std::io::Result<()>;
    fn pid(&self) -> Option<u32>;
}