Lines Matching defs:buf
37 let mut buf = [0_u8; 5];
38 preadv(&foo, &mut [IoSliceMut::new(&mut buf)], 200).unwrap();
39 assert_eq!(&buf, b"hello");
40 preadv(&foo, &mut [IoSliceMut::new(&mut buf)], 300).unwrap();
41 assert_eq!(&buf, b"world");
62 let mut buf = [0_u8; 5];
63 pread(&foo, &mut buf, 200).unwrap();
64 assert_eq!(&buf, b"hello");
65 pread(&foo, &mut buf, 300).unwrap();
66 assert_eq!(&buf, b"world");
88 let mut buf = [0_u8; 5];
89 readv(&foo, &mut [IoSliceMut::new(&mut buf)]).unwrap();
90 assert_eq!(&buf, b"hello");
91 readv(&foo, &mut [IoSliceMut::new(&mut buf)]).unwrap();
92 assert_eq!(&buf, b"world");
115 let mut buf = [0_u8; 5];
116 read(&foo, &mut buf).unwrap();
117 assert_eq!(&buf, b"hello");
118 read(&foo, &mut buf).unwrap();
119 assert_eq!(&buf, b"world");
183 let mut buf = [0_u8; 5];
186 &mut [IoSliceMut::new(&mut buf)],
191 assert_eq!(&buf, b"hello");
194 &mut [IoSliceMut::new(&mut buf)],
199 assert_eq!(&buf, b"world");