(&self)
| 45 | |
| 46 | #[track_caller] |
| 47 | pub fn as_ref(&self) -> &'a T { |
| 48 | trace!("{:?}::as_ref", self); |
| 49 | assert_ne!( |
| 50 | self.ptr, |
| 51 | 0, |
| 52 | "cannot deref null for &{}", |
| 53 | any::type_name::<T>() |
| 54 | ); |
| 55 | let obj = self.ptr as *const T; |
| 56 | |
| 57 | unsafe { &*obj } |
| 58 | } |
| 59 | |
| 60 | #[track_caller] |
| 61 | pub fn as_mut(&mut self) -> &mut T { |
no outgoing calls
no test coverage detected