Home
last modified time | relevance | path

Searched refs:UninitSlice (Results 1 – 9 of 9) sorted by relevance

/external/rust/crates/bytes/src/buf/
Duninit_slice.rs22 pub struct UninitSlice([MaybeUninit<u8>]); struct
24 impl UninitSlice { impl
43 pub unsafe fn from_raw_parts_mut<'a>(ptr: *mut u8, len: usize) -> &'a mut UninitSlice { in from_raw_parts_mut() argument
46 &mut *(maybe_init as *mut [MaybeUninit<u8>] as *mut UninitSlice) in from_raw_parts_mut()
141 impl fmt::Debug for UninitSlice { implementation
150 impl Index<$t> for UninitSlice {
151 type Output = UninitSlice;
153 fn index(&self, index: $t) -> &UninitSlice {
155 unsafe { &*(maybe_uninit as *const [MaybeUninit<u8>] as *const UninitSlice) }
159 impl IndexMut<$t> for UninitSlice {
[all …]
Dbuf_mut.rs1 use crate::buf::{limit, Chain, Limit, UninitSlice};
161 fn chunk_mut(&mut self) -> &mut UninitSlice; in chunk_mut() argument
916 fn chunk_mut(&mut self) -> &mut UninitSlice {
1001 fn chunk_mut(&mut self) -> &mut UninitSlice { in chunk_mut() argument
1036 fn chunk_mut(&mut self) -> &mut UninitSlice { in chunk_mut() argument
1045 unsafe { &mut UninitSlice::from_raw_parts_mut(ptr, cap)[len..] } in chunk_mut()
Dlimit.rs1 use crate::buf::UninitSlice;
64 fn chunk_mut(&mut self) -> &mut UninitSlice { in chunk_mut() argument
Dchain.rs1 use crate::buf::{IntoIter, UninitSlice};
184 fn chunk_mut(&mut self) -> &mut UninitSlice { in chunk_mut() argument
Dmod.rs38 pub use self::uninit_slice::UninitSlice;
/external/rust/crates/bytes/tests/
Dtest_buf_mut.rs3 use bytes::buf::UninitSlice;
84 fn chunk_mut(&mut self) -> &mut UninitSlice { in test_deref_bufmut_forwards() argument
109 let slice = unsafe { UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), 3) }; in write_byte_panics_if_out_of_bounds()
118 let slice = unsafe { UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), 3) }; in copy_from_slice_panics_if_different_length_1()
127 let slice = unsafe { UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), 3) }; in copy_from_slice_panics_if_different_length_2()
/external/rust/crates/bytes/src/
Dbytes_mut.rs14 use crate::buf::{IntoIter, UninitSlice};
913 fn uninit_slice(&mut self) -> &mut UninitSlice { in uninit_slice() argument
918 UninitSlice::from_raw_parts_mut(ptr, len) in uninit_slice()
988 fn chunk_mut(&mut self) -> &mut UninitSlice { in chunk_mut() argument
/external/rust/crates/protobuf/src/
Dbuf_read_iter.rs9 use bytes::buf::UninitSlice;
321 unsafe fn uninit_slice_as_mut_slice(slice: &mut UninitSlice) -> &mut [u8] { in uninit_slice_as_mut_slice()
/external/rust/crates/bytes/
DCHANGELOG.md24 - `BufMut::bytes_mut()` returns `&mut UninitSlice`, a type owned by `bytes` to