/external/rust/crates/bytes/src/ |
D | bytes_mut.rs | 61 pub struct BytesMut { struct 118 impl BytesMut { implementation 142 pub fn with_capacity(capacity: usize) -> BytesMut { in with_capacity() argument 143 BytesMut::from_vec(Vec::with_capacity(capacity)) in with_capacity() 166 pub fn new() -> BytesMut { in new() 167 BytesMut::with_capacity(0) in new() 274 pub fn zeroed(len: usize) -> BytesMut { in zeroed() argument 275 BytesMut::from_vec(vec![0; len]) in zeroed() 305 pub fn split_off(&mut self, at: usize) -> BytesMut { in split_off() argument 346 pub fn split(&mut self) -> BytesMut { in split() argument [all …]
|
/external/rust/crates/bytes/tests/ |
D | test_bytes.rs | 3 use bytes::{Buf, BufMut, Bytes, BytesMut}; 16 is_sync::<BytesMut>(); in test_bounds() 18 is_send::<BytesMut>(); in test_bounds() 31 mem::size_of::<BytesMut>(), in test_layout() 43 mem::size_of::<BytesMut>(), in test_layout() 44 mem::size_of::<Option<BytesMut>>(), in test_layout() 59 let a = BytesMut::from(&b"abcdefgh"[..]); in from_slice() 75 let a = format!("{:?}", BytesMut::from(&b"abcdefg"[..])); in fmt() 85 let mut a = BytesMut::with_capacity(64); in fmt_write() 89 let mut b = BytesMut::with_capacity(64); in fmt_write() [all …]
|
D | test_serde.rs | 10 let b = bytes::BytesMut::with_capacity(0); in test_ser_de_empty() 18 let b = bytes::BytesMut::from(&b"bytes"[..]); in test_ser_de()
|
/external/rust/crates/bytes/benches/ |
D | bytes_mut.rs | 6 use bytes::{BufMut, BytesMut}; 13 test::black_box(BytesMut::with_capacity(12)); in alloc_small() 21 test::black_box(BytesMut::with_capacity(128)); in alloc_mid() 28 test::black_box(BytesMut::with_capacity(4096)); in alloc_big() 34 let mut buf = BytesMut::with_capacity(4096); in deref_unique() 46 let mut buf = BytesMut::with_capacity(4096); in deref_unique_unroll() 65 let mut buf = BytesMut::with_capacity(4096); in deref_shared() 78 let mut buf1 = BytesMut::with_capacity(8); in deref_two() 81 let mut buf2 = BytesMut::with_capacity(4096); in deref_two() 94 let bytes = BytesMut::from(&b"hello world 1234567890 and have a good byte 0987654321"[..]) in clone_frozen() [all …]
|
/external/rust/crates/bytes/ |
D | CHANGELOG.md | 9 - Avoid large reallocations when freezing `BytesMut` (#592) 20 - Rename and expose `BytesMut::spare_capacity_mut` (#572) 41 - Add `BytesMut::zeroed` (#517) 42 - Implement `Extend<Bytes>` for `BytesMut` (#527) 43 - Add conversion from `BytesMut` to `Vec<u8>` (#543, #554) 50 - Reuse vector in `BytesMut::reserve` (#539, #544) 57 - Fix amortized asymptotics of `BytesMut` (#555) 62 - Clarify `BytesMut::unsplit` docs (#535) 120 - Improve `BytesMut` to reuse buffer when fully `advance`d. 121 - Mark `BytesMut::{as_mut, set_len}` with `#[inline]`. [all …]
|
/external/rust/crates/tokio-util/src/codec/ |
D | bytes_codec.rs | 4 use bytes::{BufMut, Bytes, BytesMut}; 55 type Item = BytesMut; 58 fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<BytesMut>, io::Error> { in decode() argument 71 fn encode(&mut self, data: Bytes, buf: &mut BytesMut) -> Result<(), io::Error> { in encode() 78 impl Encoder<BytesMut> for BytesCodec { 81 fn encode(&mut self, data: BytesMut, buf: &mut BytesMut) -> Result<(), io::Error> { in encode() argument
|
D | framed.rs | 8 use bytes::BytesMut; 108 buffer: BytesMut::with_capacity(capacity), in with_capacity() 237 pub fn read_buffer(&self) -> &BytesMut { in read_buffer() argument 242 pub fn read_buffer_mut(&mut self) -> &mut BytesMut { in read_buffer_mut() argument 247 pub fn write_buffer(&self) -> &BytesMut { in write_buffer() argument 252 pub fn write_buffer_mut(&mut self) -> &mut BytesMut { in write_buffer_mut() argument 359 pub read_buf: BytesMut, 362 pub write_buf: BytesMut, 378 read_buf: BytesMut::new(), in new() 379 write_buf: BytesMut::new(), in new()
|
D | framed_impl.rs | 7 use bytes::BytesMut; 33 pub(crate) buffer: BytesMut, 38 pub(crate) buffer: BytesMut, 53 buffer: BytesMut::with_capacity(INITIAL_CAPACITY), in default() 62 buffer: BytesMut::with_capacity(INITIAL_CAPACITY), in default() 68 impl From<BytesMut> for ReadFrame { 69 fn from(mut buffer: BytesMut) -> Self { in from() 84 impl From<BytesMut> for WriteFrame { 85 fn from(mut buffer: BytesMut) -> Self { in from()
|
D | length_delimited.rs | 379 use bytes::{Buf, BufMut, Bytes, BytesMut}; 474 fn decode_head(&mut self, src: &mut BytesMut) -> io::Result<Option<usize>> { in decode_head() 534 fn decode_data(&self, n: usize, src: &mut BytesMut) -> Option<BytesMut> { in decode_data() argument 546 type Item = BytesMut; 549 fn decode(&mut self, src: &mut BytesMut) -> io::Result<Option<BytesMut>> { in decode() argument 579 fn encode(&mut self, data: Bytes, dst: &mut BytesMut) -> Result<(), io::Error> { in encode()
|
D | decoder.rs | 5 use bytes::BytesMut; 124 fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>, Self::Error>; in decode() 144 fn decode_eof(&mut self, buf: &mut BytesMut) -> Result<Option<Self::Item>, Self::Error> { in decode_eof()
|
D | lines_codec.rs | 4 use bytes::{Buf, BufMut, BytesMut}; 110 fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<String>, LinesCodecError> { in decode() 166 fn decode_eof(&mut self, buf: &mut BytesMut) -> Result<Option<String>, LinesCodecError> { in decode_eof() 191 fn encode(&mut self, line: T, buf: &mut BytesMut) -> Result<(), LinesCodecError> { in encode()
|
D | any_delimiter_codec.rs | 4 use bytes::{Buf, BufMut, Bytes, BytesMut}; 138 fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<Bytes>, AnyDelimiterCodecError> { in decode() 195 fn decode_eof(&mut self, buf: &mut BytesMut) -> Result<Option<Bytes>, AnyDelimiterCodecError> { in decode_eof() 218 fn encode(&mut self, chunk: T, buf: &mut BytesMut) -> Result<(), AnyDelimiterCodecError> { in encode()
|
D | framed_read.rs | 7 use bytes::BytesMut; 53 buffer: BytesMut::with_capacity(capacity), in with_capacity() 138 pub fn read_buffer(&self) -> &BytesMut { in read_buffer() argument 143 pub fn read_buffer_mut(&mut self) -> &mut BytesMut { in read_buffer_mut() argument
|
D | encoder.rs | 1 use bytes::BytesMut; 24 fn encode(&mut self, item: Item, dst: &mut BytesMut) -> Result<(), Self::Error>; in encode()
|
/external/rust/crates/tokio-util/tests/ |
D | codecs.rs | 5 use bytes::{BufMut, Bytes, BytesMut}; 10 let buf = &mut BytesMut::new(); in bytes_decoder() 29 let mut buf = BytesMut::new(); in bytes_encoder() 37 let mut buf = BytesMut::with_capacity(INITIAL_CAPACITY); in bytes_encoder() 42 .encode(BytesMut::from(&b"hello"[..]), &mut buf) in bytes_encoder() 49 let buf = &mut BytesMut::new(); in lines_decoder() 70 let buf = &mut BytesMut::new(); in lines_decoder_max_length() 134 let buf = &mut BytesMut::new(); in lines_decoder_max_length_underrun() 155 let buf = &mut BytesMut::new(); in lines_decoder_max_length_bursts() 171 let buf = &mut BytesMut::new(); in lines_decoder_max_length_big_burst() [all …]
|
D | framed.rs | 7 use bytes::{Buf, BufMut, BytesMut}; 24 fn decode(&mut self, buf: &mut BytesMut) -> io::Result<Option<u32>> { in decode() 38 fn encode(&mut self, item: u32, dst: &mut BytesMut) -> io::Result<()> { in encode() 56 fn decode(&mut self, buf: &mut BytesMut) -> io::Result<Option<u64>> { in decode() 70 fn encode(&mut self, item: u64, dst: &mut BytesMut) -> io::Result<()> { in encode() 103 parts.read_buf = BytesMut::from(&[0, 0, 0, 42][..]); in can_read_from_existing_buf() 115 parts.read_buf = BytesMut::from(&[0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 84][..]); in can_read_from_existing_buf_after_codec_changed() 135 parts.read_buf = BytesMut::from(&[0, 0, 0, 42][..]); in external_buf_grows_to_init() 146 parts.read_buf = BytesMut::from(&vec![0; INITIAL_CAPACITY * 2][..]); in external_buf_does_not_shrink()
|
/external/rust/crates/tokio-util/src/udp/ |
D | frame.rs | 6 use bytes::{BufMut, BytesMut}; 42 rd: BytesMut, 43 wr: BytesMut, 187 rd: BytesMut::with_capacity(INITIAL_RD_CAPACITY), in new() 188 wr: BytesMut::with_capacity(INITIAL_WR_CAPACITY), in new() 236 pub fn read_buffer(&self) -> &BytesMut { in read_buffer() argument 241 pub fn read_buffer_mut(&mut self) -> &mut BytesMut { in read_buffer_mut() argument
|
/external/rust/crates/tokio-util/src/io/ |
D | reader_stream.rs | 1 use bytes::{Bytes, BytesMut}; 52 buf: BytesMut, 66 buf: BytesMut::new(), in new() 80 buf: BytesMut::with_capacity(capacity), in with_capacity()
|
/external/rust/crates/bytes/src/fmt/ |
D | hex.rs | 4 use crate::{Bytes, BytesMut}; 35 hex_impl!(LowerHex, BytesMut); 37 hex_impl!(UpperHex, BytesMut);
|
/external/rust/crates/tokio/tests/ |
D | io_write_all.rs | 7 use bytes::BytesMut; 16 buf: BytesMut, in write_all() 44 buf: BytesMut::with_capacity(64), in write_all()
|
D | io_write.rs | 7 use bytes::BytesMut; 15 buf: BytesMut, in write() 40 buf: BytesMut::with_capacity(64), in write()
|
D | io_write_buf.rs | 7 use bytes::BytesMut; 16 buf: BytesMut, in write_all() 46 buf: BytesMut::with_capacity(64), in write_all()
|
D | io_write_all_buf.rs | 7 use bytes::{Buf, Bytes, BytesMut}; 16 buf: BytesMut, in write_all_buf() 45 buf: BytesMut::with_capacity(64), in write_all_buf()
|
D | io_copy.rs | 4 use bytes::BytesMut; 43 buf: BytesMut, in proxy() 76 buf: BytesMut::new(), in proxy()
|
/external/rust/crates/combine/src/stream/ |
D | buf_reader.rs | 24 use bytes::{Buf, BufMut, BytesMut}; 47 buf: BytesMut 58 buf: BytesMut, 70 let buf = BytesMut::with_capacity(capacity); in with_capacity() 187 pub struct Buffer(pub(crate) BytesMut); 260 fn tokio_03_to_read_buf(bs: &mut BytesMut) -> tokio_03_dep::io::ReadBuf<'_> { in tokio_03_to_read_buf() 288 bs: &mut bytes::BytesMut, in tokio_03_read_buf() argument 321 bs: &mut bytes::BytesMut, in tokio_read_buf() argument 360 fn extend_buf_sync<R>(buf: &mut BytesMut, read: &mut R) -> io::Result<usize> in extend_buf_sync() argument 395 struct Bytes05<'a>(&'a mut BytesMut); [all …]
|