| ... | @@ -208,6 +208,9 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: Endian, comptim | ... | @@ -208,6 +208,9 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: Endian, comptim |
| 208 | /// The number of elements in the packed array. | 208 | /// The number of elements in the packed array. |
| 209 | comptime len: usize = int_count, | 209 | comptime len: usize = int_count, |
| 210 | | 210 | |
| | 211 | /// The integer type of the packed array. |
| | 212 | pub const Child = Int; |
| | 213 | |
| 211 | /// Initialize a packed array using an unpacked array | 214 | /// Initialize a packed array using an unpacked array |
| 212 | /// or, more likely, an array literal. | 215 | /// or, more likely, an array literal. |
| 213 | pub fn init(ints: [int_count]Int) Self { | 216 | pub fn init(ints: [int_count]Int) Self { |
| ... | @@ -283,6 +286,9 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: Endian) type { | ... | @@ -283,6 +286,9 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: Endian) type { |
| 283 | bit_offset: u3, | 286 | bit_offset: u3, |
| 284 | len: usize, | 287 | len: usize, |
| 285 | | 288 | |
| | 289 | /// The integer type of the packed slice. |
| | 290 | pub const Child = Int; |
| | 291 | |
| 286 | /// Calculates the number of bytes required to store a desired count | 292 | /// Calculates the number of bytes required to store a desired count |
| 287 | /// of `Int`s. | 293 | /// of `Int`s. |
| 288 | pub fn bytesRequired(int_count: usize) usize { | 294 | pub fn bytesRequired(int_count: usize) usize { |