(self, len: usize)
| 194 | } |
| 195 | |
| 196 | pub fn get_as_slice(self, len: usize) -> AxResult<&'static [T]> { |
| 197 | check_region( |
| 198 | self.address(), |
| 199 | Layout::array::<T>(len).unwrap(), |
| 200 | Self::ACCESS_FLAGS, |
| 201 | )?; |
| 202 | Ok(unsafe { slice::from_raw_parts(self.0, len) }) |
| 203 | } |
| 204 | |
| 205 | pub fn get_as_null_terminated(self) -> AxResult<&'static [T]> |
| 206 | where |
no test coverage detected