Home
last modified time | relevance | path

Searched refs:read_buf (Results 1 – 18 of 18) sorted by relevance

/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/io/
H A Dread_buf.rs275 assert_eq!(read_buf.filled().len(), 0); in ut_test_readbuf_new()
277 assert_eq!(read_buf.capacity(), 16); in ut_test_readbuf_new()
280 read_buf.set_filled(9); in ut_test_readbuf_new()
281 assert_eq!(read_buf.filled().len(), 9); in ut_test_readbuf_new()
284 let borrow = read_buf.filled_mut(); in ut_test_readbuf_new()
287 assert_eq!(read_buf.filled()[0], 1); in ut_test_readbuf_new()
298 assert_eq!(read_buf.filled()[1], 2); in ut_test_readbuf_new()
306 let buf_b = read_buf.inner_mut(); in ut_test_readbuf_new()
309 read_buf.clear(); in ut_test_readbuf_new()
310 assert_eq!(read_buf.filled().len(), 0); in ut_test_readbuf_new()
[all …]
H A Dmod.rs23 mod read_buf; module
37 pub use read_buf::ReadBuf;
H A Dstdio.rs217 let mut read_buf = ReadBuf::new(&mut buf); in ut_test_stdio_basic() localVariable
218 buf_inner.set_len(&mut read_buf); in ut_test_stdio_basic()
222 let mut read_buf = ReadBuf::new(&mut buf); in ut_test_stdio_basic() localVariable
223 let n = buf_inner.clone_into(&mut read_buf); in ut_test_stdio_basic()
H A Dread_task.rs26 use crate::io::read_buf::ReadBuf;
109 let mut read_buf = ReadBuf::uninit(unsafe { in poll_read_to_end() localVariable
112 read_buf.assume_init(len); in poll_read_to_end()
113 read_buf.set_filled(len); in poll_read_to_end()
115 let poll = Pin::new(&mut reader).poll_read(cx, &mut read_buf); in poll_read_to_end()
116 let new_len = read_buf.filled_len(); in poll_read_to_end()
H A Dasync_read.rs19 use crate::io::read_buf::ReadBuf;
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/net/sys/unix/
H A Dlistener.rs179 let mut read_buf = [0_u8; 12]; in ut_uds_listener_read_write_test() localVariable
188 let mut read_buf = [0_u8; 12]; in ut_uds_listener_read_write_test() localVariable
189 stream.read_exact(&mut read_buf).await.unwrap(); in ut_uds_listener_read_write_test()
191 std::str::from_utf8(&read_buf).unwrap(), in ut_uds_listener_read_write_test()
200 stream.read_exact(&mut read_buf).await.unwrap(); in ut_uds_listener_read_write_test()
202 std::str::from_utf8(&read_buf).unwrap(), in ut_uds_listener_read_write_test()
H A Dstream.rs439 let mut read_buf = [0_u8; 5]; in ut_uds_stream_pair_test() localVariable
440 let len = client.read(&mut read_buf).await.unwrap(); in ut_uds_stream_pair_test()
441 assert_eq!(std::str::from_utf8(&read_buf).unwrap(), "hello".to_string()); in ut_uds_stream_pair_test()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Duds_test.rs40 let mut read_buf = [0_u8; 12]; in sdv_uds_stream_test() localVariable
45 let n = stream.read(&mut read_buf).await.unwrap(); in sdv_uds_stream_test()
48 std::str::from_utf8(&read_buf).unwrap(), in sdv_uds_stream_test()
54 let mut read_buf = [0_u8; 12]; in sdv_uds_stream_test() localVariable
57 let n = stream.read(&mut read_buf).await.unwrap(); in sdv_uds_stream_test()
60 std::str::from_utf8(&read_buf).unwrap(), in sdv_uds_stream_test()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/
H A Dhttp_body.rs140 let mut read_buf = [0_u8; TRAILER_SIZE]; in poll_trailer() localVariable
145 match chunk.data(cx, &mut read_buf) { in poll_trailer()
238 let mut read_buf = ReadBuf::new(&mut buf[read..]); in poll_read_io() localVariable
239 match Pin::new(&mut io).poll_read(cx, &mut read_buf) { in poll_read_io()
242 let filled = read_buf.filled().len(); in poll_read_io()
357 let mut read_buf = ReadBuf::new(&mut buf[read..]); in poll_read_io() localVariable
358 match Pin::new(&mut io).poll_read(cx, &mut read_buf) { in poll_read_io()
361 let filled = read_buf.filled().len(); in poll_read_io()
453 let mut read_buf = ReadBuf::new(&mut buf[read..]); in data() localVariable
454 match Pin::new(&mut io).poll_read(cx, &mut read_buf) { in data()
[all …]
H A Drequest.rs480 let mut read_buf = ReadBuf::new(&mut buf); in ut_client_request_builder_body() localVariable
481 poll_fn(|cx| Pin::new(request.body_mut()).poll_read(cx, &mut read_buf)) in ut_client_request_builder_body()
485 let len = read_buf.filled().len(); in ut_client_request_builder_body()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/util/h2/
H A Ddata_ref.rs50 let mut read_buf = ReadBuf::new(buf); in poll_read() localVariable
52 match data.poll_read(cx, &mut read_buf) { in poll_read()
56 Poll::Ready(Ok(_)) => Poll::Ready(Ok(read_buf.filled().len())), in poll_read()
H A Doutput.rs84 let mut read_buf = ReadBuf::new(&mut buf); in poll_read_frame() localVariable
85 match Pin::new(&mut self.reader).poll_read(cx, &mut read_buf) { in poll_read_frame()
94 let read = read_buf.filled().len(); in poll_read_frame()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/io/buffered/
H A Dasync_buf_reader.rs204 let mut read_buf = ReadBuf::new(&mut this.buf); in poll_fill_buf() localVariable
206 poll_ready!(Pin::new_unchecked(&mut this.inner).poll_read(cx, &mut read_buf))?; in poll_fill_buf()
209 this.filled = read_buf.filled_len(); in poll_fill_buf()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/
H A Dsimple.rs742 let mut read_buf = ReadBuf::new(&mut buf); in multipart_poll_data() localVariable
743 poll_fn(|cx| Pin::new(&mut mp).poll_read(cx, &mut read_buf)) in multipart_poll_data()
747 let len = read_buf.filled_len(); in multipart_poll_data()
793 let mut read_buf = ReadBuf::new(&mut buf); in multipart_poll_data_stream() localVariable
794 poll_fn(|cx| Pin::new(&mut mp).poll_read(cx, &mut read_buf)) in multipart_poll_data_stream()
798 let len = read_buf.filled().len(); in multipart_poll_data_stream()
/ohos5.0/base/sensors/sensor/rust/utils/socket_ipc_rust_ffi/src/
H A Dstream_buffer.rs173 fn read_buf(&self) -> *const c_char { in read_buf() method
252 … binding::memcpy_s(buf as *mut libc::c_void, size, self.read_buf() as *const libc::c_void, size) in read_char_usize()
282 let buf: *const c_char = self.read_buf(); in read_client_packets()
/ohos5.0/base/request/request/services/src/task/
H A Dupload.rs72 let mut read_buf = buf.take(total_upload_bytes); in poll_read() localVariable
73 match Pin::new(file).poll_read(cx, &mut read_buf) { in poll_read()
75 let upload_size = read_buf.filled().len(); in poll_read()
/ohos5.0/base/sensors/sensor/rust/utils/socket_ipc_rust_ffi/src/stream_buffer/
H A Dffi.rs286 obj.read_buf() in StreamBufferReadBuf()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/
H A Dchunk.rs200 let mut read_buf = ReadBuf::new(&mut self.chunk_data.chunk_buf); in poll_partial() localVariable
202 match Pin::new(&mut *self.from).poll_read(_cx, &mut read_buf) { in poll_partial()
204 let size = read_buf.filled().len(); in poll_partial()