Lines Matching defs:usize
42 /// This field must be correctly sized to hold a `usize`.
48 const DRIVER_DATA_OFFSET: usize;
52 fn index(&self) -> usize;
57 pub struct RawIdArray<T: RawDeviceId, const N: usize> {
62 impl<T: RawDeviceId, const N: usize> RawIdArray<T, N> {
64 pub const fn size(&self) -> usize {
71 pub struct IdArray<T: RawDeviceId, U, const N: usize> {
76 impl<T: RawDeviceId, U, const N: usize> IdArray<T, U, N> {
87 /// - The field at `data_offset` must be correctly sized to hold a `usize`.
88 const unsafe fn build(ids: [(T, U); N], data_offset: Option<usize>) -> Self {
92 let mut i = 0usize;
104 .cast::<usize>()
147 impl<T: RawDeviceId + RawDeviceIdIndex, U, const N: usize> IdArray<T, U, N> {
170 fn id(&self, index: usize) -> &T::RawType;
173 fn info(&self, index: usize) -> &U;
176 impl<T: RawDeviceId, U, const N: usize> IdTable<T, U> for IdArray<T, U, N> {
183 fn id(&self, index: usize) -> &T::RawType {
187 fn info(&self, index: usize) -> &U {