Home
last modified time | relevance | path

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

/external/rust/crates/bytes/src/
Dbytes_mut.rs60 pub struct BytesMut { struct
117 impl BytesMut { implementation
141 pub fn with_capacity(capacity: usize) -> BytesMut { in with_capacity() argument
142 BytesMut::from_vec(Vec::with_capacity(capacity)) in with_capacity()
165 pub fn new() -> BytesMut { in new()
166 BytesMut::with_capacity(0) in new()
288 pub fn split_off(&mut self, at: usize) -> BytesMut { in split_off() argument
329 pub fn split(&mut self) -> BytesMut { in split() argument
361 pub fn split_to(&mut self, at: usize) -> BytesMut { in split_to() argument
722 pub fn unsplit(&mut self, other: BytesMut) { in unsplit() argument
[all …]
Dserde.rs1 use super::{Bytes, BytesMut};
89 serde_impl!(BytesMut, BytesMutVisitor, from, from_vec);
Dlib.rs92 pub use crate::bytes_mut::BytesMut;
/external/rust/crates/bytes/tests/
Dtest_bytes.rs3 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 …]
Dtest_serde.rs10 let b = bytes::BytesMut::with_capacity(0); in test_ser_de_empty()
18 let b = bytes::BytesMut::from(&b"bytes"[..]); in test_ser_de()
Dtest_buf_mut.rs4 use bytes::{BufMut, BytesMut};
60 let mut buf = BytesMut::with_capacity(100); in test_clone()
/external/rust/crates/bytes/benches/
Dbytes_mut.rs6 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/
DCHANGELOG.md36 - Improve `BytesMut` to reuse buffer when fully `advance`d.
37 - Mark `BytesMut::{as_mut, set_len}` with `#[inline]`.
48 - Fix `BytesMut::freeze` ignoring amount previously `advance`d (#352).
54 - Add `From<BytesMut>` for `Bytes`.
79 - Growth documentation for `BytesMut` (#321)
89 - `BytesMut` implicitly grows internal storage. `remaining_mut()` returns
104 - `BorrowMut` implementation for `BytesMut` (#185).
117 - Implement `FromIterator<&'a u8>` for `BytesMut`/`Bytes` (#244).
138 * Fix panic in `BytesMut` `FromIterator` implementation.
145 * impl BorrowMut for BytesMut (#185).
[all …]
DREADME.md27 use bytes::{Bytes, BytesMut, Buf, BufMut};
/external/rust/crates/bytes/src/fmt/
Dhex.rs4 use crate::{Bytes, BytesMut};
35 hex_impl!(LowerHex, BytesMut);
37 hex_impl!(UpperHex, BytesMut);
Ddebug.rs4 use crate::{Bytes, BytesMut};
45 impl Debug for BytesMut { implementation
/external/rust/crates/tokio/tests/
Dio_write_all.rs7 use bytes::BytesMut;
16 buf: BytesMut, in write_all()
44 buf: BytesMut::with_capacity(64), in write_all()
Dio_write_buf.rs7 use bytes::BytesMut;
16 buf: BytesMut, in write_all()
46 buf: BytesMut::with_capacity(64), in write_all()
Dio_write.rs7 use bytes::BytesMut;
15 buf: BytesMut, in write()
40 buf: BytesMut::with_capacity(64), in write()
/external/rust/crates/tokio/src/io/util/
Dmem.rs6 use bytes::{Buf, BytesMut};
55 buffer: BytesMut,
146 buffer: BytesMut::new(), in new()
/external/rust/crates/protobuf/src/
Dbuf_read_iter.rs15 use bytes::BytesMut;
309 let mut r = BytesMut::with_capacity(len); in read_exact_bytes()
/external/rust/crates/bytes/src/buf/
Dbuf_impl.rs818 let mut ret = crate::BytesMut::with_capacity(len); in copy_to_bytes()
/external/rust/crates/nix/test/sys/
Dtest_aio.rs1 use bytes::{Bytes, BytesMut};
373 let rbuf = Box::new(BytesMut::from(vec![0; 4])); in test_read_bytes_mut_small()