stevenkhan commited on
Commit
81568be
·
verified ·
1 Parent(s): ac0315a

Upload spectral-pty/src/lib.rs

Browse files
Files changed (1) hide show
  1. spectral-pty/src/lib.rs +17 -0
spectral-pty/src/lib.rs ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ use std::io::{Read, Write};
2
+
3
+ #[cfg(unix)]
4
+ pub mod unix;
5
+
6
+ #[cfg(windows)]
7
+ pub mod windows;
8
+
9
+ #[cfg(unix)]
10
+ pub use unix::Pty;
11
+ #[cfg(windows)]
12
+ pub use windows::Pty;
13
+
14
+ pub trait PtyTrait: Read + Write + Send {
15
+ fn resize(&mut self, cols: u16, rows: u16) -> std::io::Result<()>;
16
+ fn pid(&self) -> Option<u32>;
17
+ }