MCPcopy Create free account
hub / github.com/Starry-OS/StarryOS / get_as_ref

Method get_as_ref

api/src/mm.rs:191–194  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

189 }
190
191 pub fn get_as_ref(self) -> AxResult<&'static T> {
192 check_region(self.address(), Layout::new::<T>(), Self::ACCESS_FLAGS)?;
193 Ok(unsafe { &*self.0 })
194 }
195
196 pub fn get_as_slice(self, len: usize) -> AxResult<&'static [T]> {
197 check_region(

Callers 5

read_familyFunction · 0.80
read_from_userMethod · 0.80
getFunction · 0.80
sys_sendmsgFunction · 0.80
sys_epoll_ctlFunction · 0.80

Calls 2

check_regionFunction · 0.85
addressMethod · 0.80

Tested by

no test coverage detected