Home
last modified time | relevance | path

Searched refs:MaybeUninit (Results 1 – 25 of 89) sorted by relevance

1234

/external/rust/crates/tokio/src/io/
Dread_buf.rs6 use std::mem::{self, MaybeUninit};
28 buf: &'a mut [MaybeUninit<u8>],
38 let buf = unsafe { mem::transmute::<&mut [u8], &mut [MaybeUninit<u8>]>(buf) }; in new()
50 pub fn uninit(buf: &'a mut [MaybeUninit<u8>]) -> ReadBuf<'a> { in uninit()
71 unsafe { mem::transmute::<&[MaybeUninit<u8>], &[u8]>(slice) } in filled()
81 unsafe { mem::transmute::<&mut [MaybeUninit<u8>], &mut [u8]>(slice) } in filled_mut()
101 unsafe { mem::transmute::<&[MaybeUninit<u8>], &[u8]>(slice) } in initialized()
113 unsafe { mem::transmute::<&mut [MaybeUninit<u8>], &mut [u8]>(slice) } in initialized_mut()
131 pub unsafe fn inner_mut(&mut self) -> &mut [MaybeUninit<u8>] { in inner_mut()
143 pub unsafe fn unfilled_mut(&mut self) -> &mut [MaybeUninit<u8>] { in unfilled_mut()
[all …]
/external/rust/crates/bytes/src/buf/
Duninit_slice.rs2 use core::mem::MaybeUninit;
22 pub struct UninitSlice([MaybeUninit<u8>]);
44 let maybe_init: &mut [MaybeUninit<u8>] = in from_raw_parts_mut()
46 &mut *(maybe_init as *mut [MaybeUninit<u8>] as *mut UninitSlice) in from_raw_parts_mut()
154 let maybe_uninit: &[MaybeUninit<u8>] = &self.0[index];
155 unsafe { &*(maybe_uninit as *const [MaybeUninit<u8>] as *const UninitSlice) }
161 let maybe_uninit: &mut [MaybeUninit<u8>] = &mut self.0[index];
162 unsafe { &mut *(maybe_uninit as *mut [MaybeUninit<u8>] as *mut UninitSlice) }
/external/rust/crates/tokio/src/net/unix/
Ducred.rs111 use std::mem::MaybeUninit;
118 let mut uid = MaybeUninit::uninit(); in get_peer_cred()
119 let mut gid = MaybeUninit::uninit(); in get_peer_cred()
143 use std::mem::MaybeUninit;
150 let mut uid = MaybeUninit::uninit(); in get_peer_cred()
151 let mut gid = MaybeUninit::uninit(); in get_peer_cred()
152 let mut pid: MaybeUninit<pid_t> = MaybeUninit::uninit(); in get_peer_cred()
153 let mut pid_size: MaybeUninit<u32> = MaybeUninit::new(size_of::<pid_t>() as u32); in get_peer_cred()
/external/rust/cxx/src/
Dcxx_string.rs8 use core::mem::MaybeUninit;
15 fn string_init(this: &mut MaybeUninit<CxxString>, ptr: *const u8, len: usize); in string_init()
17 fn string_destroy(this: &mut MaybeUninit<CxxString>); in string_destroy()
213 space: MaybeUninit<[usize; 8]>,
219 space: MaybeUninit::uninit(), in new()
225 let this = &mut *self.space.as_mut_ptr().cast::<MaybeUninit<CxxString>>(); in init()
234 let this = &mut *self.space.as_mut_ptr().cast::<MaybeUninit<CxxString>>(); in drop()
Dshared_ptr.rs9 use core::mem::MaybeUninit;
30 let mut shared_ptr = MaybeUninit::<SharedPtr<T>>::uninit(); in null()
43 let mut shared_ptr = MaybeUninit::<SharedPtr<T>>::uninit(); in new()
77 let mut weak_ptr = MaybeUninit::<WeakPtr<T>>::uninit(); in downgrade()
94 let mut shared_ptr = MaybeUninit::<SharedPtr<T>>::uninit(); in clone()
Dweak_ptr.rs6 use core::mem::MaybeUninit;
31 let mut weak_ptr = MaybeUninit::<WeakPtr<T>>::uninit(); in null()
48 let mut shared_ptr = MaybeUninit::<SharedPtr<T>>::uninit(); in upgrade()
65 let mut weak_ptr = MaybeUninit::<WeakPtr<T>>::uninit(); in clone()
/external/rust/cxx/src/symbols/
Drust_str.rs2 use core::mem::MaybeUninit;
8 unsafe extern "C" fn str_new(this: &mut MaybeUninit<&str>) { in str_new()
13 unsafe extern "C" fn str_ref<'a>(this: &mut MaybeUninit<&'a str>, string: &'a String) { in str_ref()
18 unsafe extern "C" fn str_from(this: &mut MaybeUninit<&str>, ptr: *const u8, len: usize) -> bool { in str_from()
Drust_string.rs3 use core::mem::{ManuallyDrop, MaybeUninit};
9 unsafe extern "C" fn string_new(this: &mut MaybeUninit<String>) { in string_new()
14 unsafe extern "C" fn string_clone(this: &mut MaybeUninit<String>, other: &String) { in string_clone()
20 this: &mut MaybeUninit<String>, in string_from()
Drust_slice.rs2 use core::mem::MaybeUninit;
6 unsafe extern "C" fn slice_new(this: &mut MaybeUninit<RustSlice>, ptr: *const (), len: usize) { in slice_new()
/external/rust/crates/tokio/src/sync/mpsc/
Dblock.rs5 use std::mem::MaybeUninit;
40 struct Values<T>([UnsafeCell<MaybeUninit<T>>; BLOCK_CAP]);
149 ptr::write(ptr, MaybeUninit::new(value)); in write()
366 let mut vals = MaybeUninit::uninit(); in uninitialized()
370 let p = vals.as_mut_ptr() as *mut UnsafeCell<MaybeUninit<T>>; in uninitialized()
373 .write(UnsafeCell::new(MaybeUninit::uninit())); in uninitialized()
382 type Output = UnsafeCell<MaybeUninit<T>>;
/external/rust/crates/nix/src/
Dtime.rs12 use std::mem::MaybeUninit;
210 let mut c_time: MaybeUninit<libc::timespec> = MaybeUninit::uninit(); in clock_getres()
220 let mut c_time: MaybeUninit<libc::timespec> = MaybeUninit::uninit(); in clock_gettime()
252 let mut clk_id: MaybeUninit<libc::clockid_t> = MaybeUninit::uninit(); in clock_getcpuclockid()
Dmqueue.rs51 let mut attr = mem::MaybeUninit::<libc::mq_attr>::uninit(); in new()
137 let mut attr = mem::MaybeUninit::<libc::mq_attr>::uninit(); in mq_getattr()
148 let mut attr = mem::MaybeUninit::<libc::mq_attr>::uninit(); in mq_setattr()
/external/rust/crates/rusqlite/src/blob/
Dpos_io.rs4 use std::mem::MaybeUninit;
87 let as_uninit: &mut [MaybeUninit<u8>] = in read_at()
109 buf: &'a mut [MaybeUninit<u8>], in raw_read_at()
182 buf: &'a mut [MaybeUninit<u8>], in raw_read_at_exact()
264 let mut s2: [std::mem::MaybeUninit<u8>; 10] = [std::mem::MaybeUninit::uninit(); 10]; in test_pos_io()
/external/rust/crates/mio/src/sys/windows/
Dudp.rs2 use std::mem::{self, MaybeUninit};
34 let mut optval: MaybeUninit<c_int> = MaybeUninit::uninit(); in only_v6()
/external/rust/crates/tokio/src/io/util/
Dvec_with_initialized.rs2 use std::mem::MaybeUninit;
80 let ptr = vec.as_mut_ptr().cast::<MaybeUninit<u8>>(); in get_read_buf()
81 let slice = unsafe { std::slice::from_raw_parts_mut::<'a, MaybeUninit<u8>>(ptr, cap) }; in get_read_buf()
Dread_buf.rs44 use std::mem::MaybeUninit; in poll()
54 let dst = unsafe { &mut *(dst as *mut _ as *mut [MaybeUninit<u8>]) }; in poll()
/external/rust/crates/tokio/src/sync/
Donce_cell.rs6 use std::mem::MaybeUninit;
37 value: UnsafeCell<MaybeUninit<T>>,
85 value: UnsafeCell::new(MaybeUninit::uninit()), in new()
100 value: UnsafeCell::new(MaybeUninit::new(v)), in new_with()
114 value: UnsafeCell::new(MaybeUninit::uninit()), in const_new()
/external/rust/crates/half/src/binary16/
Dconvert.rs409 use core::{mem::MaybeUninit, ptr};
421 let mut vec = MaybeUninit::<__m128i>::zeroed(); in f16_to_f32_x86_f16c()
430 let mut vec = MaybeUninit::<__m128>::zeroed(); in f32_to_f16_x86_f16c()
441 let mut vec = MaybeUninit::<__m128i>::zeroed();
452 let mut vec = MaybeUninit::<__m128>::uninit();
463 let mut vec = MaybeUninit::<__m128i>::zeroed();
486 let mut vec = MaybeUninit::<__m128>::uninit();
/external/rust/crates/ryu/src/
Dd2s.rs30 use core::mem::MaybeUninit;
126 let mut vp_uninit: MaybeUninit<u64> = MaybeUninit::uninit(); in d2d()
128 let mut vm_uninit: MaybeUninit<u64> = MaybeUninit::uninit(); in d2d()
/external/rust/crates/crossbeam-epoch/src/
Ddeferred.rs4 use core::mem::{self, MaybeUninit};
39 let mut data = MaybeUninit::<Data>::uninit(); in new()
54 let mut data = MaybeUninit::<Data>::uninit(); in new()
/external/rust/crates/ryu/src/buffer/
Dmod.rs3 use core::mem::MaybeUninit;
23 bytes: [MaybeUninit<u8>; 24],
37 let bytes = [MaybeUninit::<u8>::uninit(); 24]; in new()
/external/rust/crates/nix/src/sys/socket/
Dsockopt.rs9 MaybeUninit
407 val: MaybeUninit<T>,
414 val: MaybeUninit::uninit(), in uninit()
454 val: MaybeUninit<c_int>,
461 val: MaybeUninit::uninit(), in uninit()
501 val: MaybeUninit<u8>,
508 val: MaybeUninit::uninit(), in uninit()
548 val: MaybeUninit<c_int>,
555 val: MaybeUninit::uninit(), in uninit()
595 val: MaybeUninit<T>,
[all …]
/external/rust/crates/parking_lot_core/src/thread_parker/
Dunix.rs12 mem::MaybeUninit,
138 let mut attr = MaybeUninit::<libc::pthread_condattr_t>::uninit(); in init()
189 let mut now = MaybeUninit::<libc::timeval>::uninit(); in timespec_now()
202 let mut now = MaybeUninit::<libc::timespec>::uninit(); in timespec_now()
/external/rust/crates/smallvec/src/
Dlib.rs99 use core::mem::MaybeUninit;
354 inline: core::mem::ManuallyDrop<MaybeUninit<A>>,
369 fn from_inline(inline: MaybeUninit<A>) -> SmallVecData<A> { in from_inline()
375 unsafe fn into_inline(self) -> MaybeUninit<A> { in into_inline()
394 Inline(MaybeUninit<A>),
415 fn from_inline(inline: MaybeUninit<A>) -> SmallVecData<A> { in from_inline()
419 unsafe fn into_inline(self) -> MaybeUninit<A> { in into_inline()
494 data: SmallVecData::from_inline(MaybeUninit::uninit()), in new()
534 let mut data = SmallVecData::<A>::from_inline(MaybeUninit::uninit()); in from_vec()
570 data: SmallVecData::from_inline(MaybeUninit::new(buf)), in from_buf()
[all …]
/external/rust/crates/spin/src/
Donce.rs5 mem::MaybeUninit,
31 data: UnsafeCell<MaybeUninit<T>>,
64 data: UnsafeCell::new(MaybeUninit::uninit()),
76 data: UnsafeCell::new(MaybeUninit::new(data)), in initialized()

1234