Lines Matching defs:IdArray
23 /// This requirement is needed so `IdArray::new` can convert `Self` to `RawType` when building
57 /// `&Self` must be stored inside a `IdArray<Self, U>`.
60 // the safety requirement of the function, this is stored in `IdArray<Self, U>` so is
74 /// `&Self` must be stored inside a `IdArray<Self, U>`, or has NULL (or 0) as driver data.
77 // the safety requirement of the function, if this is stored in `IdArray<Self, U>`, this is
91 pub struct IdArray<T: RawDeviceId, U: 'static, const N: usize> {
101 unsafe impl<T: RawDeviceId, U: Sync + 'static, const N: usize> Send for IdArray<T, U, N> {}
105 unsafe impl<T: RawDeviceId, U: Sync + 'static, const N: usize> Sync for IdArray<T, U, N> {}
107 impl<T: RawDeviceId + RawDeviceIdIndex, U: 'static, const N: usize> IdArray<T, U, N> {
142 impl<T: RawDeviceId, const N: usize> IdArray<T, (), N> {
146 /// If the device implements [`RawDeviceIdIndex`], consider using [`IdArray::new`] instead.
162 /// This trait is only implemented by `IdArray`.
164 /// The purpose of this trait is to allow `&'static dyn IdArray<T, U>` to be in context when `N` in
165 /// `IdArray` doesn't matter.
171 impl<T: RawDeviceId, U, const N: usize> IdTable<T, U> for IdArray<T, U, N> {
193 static $table_name: $crate::device_id::IdArray<
197 > = $crate::device_id::IdArray::new([$(($id, &$info),)*]);
212 static $table_name: $crate::device_id::IdArray<
216 > = $crate::device_id::IdArray::new_without_index([$($id),*]);