Lines Matching refs:buf
105 pub fn input(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in input()
107 let val = self.write_stdin(buf, block)?; in input()
110 self.write_output(&buf[0..val], true)?; in input()
122 pub fn output(&self, buf: &mut [u8], block: bool) -> Result<usize, TtyError> { in output()
123 return self.read_output(buf, block); in output()
133 pub fn stdout(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in stdout()
134 return self.write_output(buf, block); in stdout()
144 pub fn stderr(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in stderr()
145 return self.write_output(buf, block); in stderr()
155 pub fn read_stdin(&self, buf: &mut [u8], block: bool) -> Result<usize, TtyError> { in read_stdin()
158 while cnt < buf.len() { in read_stdin()
174 buf[cnt] = x; in read_stdin()
199 fn write_stdin(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in write_stdin()
201 while cnt < buf.len() { in write_stdin()
216 *r.unwrap() = buf[cnt]; in write_stdin()
231 fn read_output(&self, buf: &mut [u8], block: bool) -> Result<usize, TtyError> { in read_output()
233 while cnt < buf.len() { in read_output()
248 buf[cnt] = *val.unwrap(); in read_output()
264 fn write_output(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in write_output()
266 while cnt < buf.len() { in write_output()
281 *r.unwrap() = buf[cnt]; in write_output()