Lines Matching refs:TtyError

65 pub enum TtyError {  enum
105 pub fn input(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in input() argument
122 pub fn output(&self, buf: &mut [u8], block: bool) -> Result<usize, TtyError> { in output() argument
133 pub fn stdout(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in stdout() argument
144 pub fn stderr(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in stderr() argument
155 pub fn read_stdin(&self, buf: &mut [u8], block: bool) -> Result<usize, TtyError> { in read_stdin() argument
162 TryRecvError::Closed => return Err(TtyError::Closed), in read_stdin()
170 _ => return Err(TtyError::Unknown(format!("{err:?}"))), in read_stdin()
199 fn write_stdin(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in write_stdin() argument
205 TrySendError::Closed(_) => return Err(TtyError::Closed), in write_stdin()
210 return Err(TtyError::BufferFull(cnt)); in write_stdin()
213 _ => return Err(TtyError::Unknown(format!("{e:?}"))), in write_stdin()
231 fn read_output(&self, buf: &mut [u8], block: bool) -> Result<usize, TtyError> { in read_output() argument
237 TryRecvError::Closed => return Err(TtyError::Closed), in read_output()
245 _ => return Err(TtyError::Unknown(format!("{err:?}"))), in read_output()
264 fn write_output(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in write_output() argument
270 TrySendError::Closed(_) => return Err(TtyError::Closed), in write_output()
275 return Err(TtyError::BufferFull(cnt)); in write_output()
278 _ => return Err(TtyError::Unknown(format!("{e:?}"))), in write_output()