Lines Matching refs:buf
60 pub fn read(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read()
64 LogLevel::DEFAULT => self.read_all(buf), in read()
65 _ => self.read_level(buf), in read()
70 fn read_all(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read_all()
71 let len = self.data.len().min(buf.len()); in read_all()
75 buf[0..len].copy_from_slice(src); in read_all()
81 fn read_level(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read_level()
90 let len = data_level.len().min(buf.len()); in read_level()
94 buf[0..len].copy_from_slice(src); in read_level()
103 pub fn read_clear(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read_clear()
104 let r = self.read_all(buf); in read_clear()