Lines Matching full:ids
3 //! Generic implementation of device IDs.
58 ids: [T::RawType; N],
88 const unsafe fn build(ids: [(T, U); N], data_offset: Option<usize>) -> Self {
96 raw_ids[i] = unsafe { core::mem::transmute_copy(&ids[i].0) };
109 // SAFETY: this is effectively a move: `infos[i] = ids[i].1`. We make a copy here but
110 // later forget `ids`.
111 infos[i] = MaybeUninit::new(unsafe { core::ptr::read(&ids[i].1) });
115 core::mem::forget(ids);
122 ids: unsafe { core::mem::transmute_copy(&raw_ids) },
135 pub const fn new_without_index(ids: [(T, U); N]) -> Self {
138 unsafe { Self::build(ids, None) }
151 pub const fn new(ids: [(T, U); N]) -> Self {
155 unsafe { Self::build(ids, Some(T::DRIVER_DATA_OFFSET)) }
178 // This cannot be `self.ids.as_ptr()`, as the return pointer must have correct provenance
184 &self.raw_ids.ids[index]