(val: T)
| 28 | |
| 29 | impl<'a, T> OpaquePtr<'a, T> { |
| 30 | pub(crate) fn from(val: T) -> Self |
| 31 | where |
| 32 | T: Sized + Opaqueable, |
| 33 | { |
| 34 | let ptr: jlong = Box::into_raw(Box::new(val)) as jlong; |
| 35 | |
| 36 | let this = Self { |
| 37 | ptr, |
| 38 | ty: PhantomData, |
| 39 | }; |
| 40 | |
| 41 | debug!("{:?}::from", this); |
| 42 | |
| 43 | this |
| 44 | } |
| 45 | |
| 46 | #[track_caller] |
| 47 | pub fn as_ref(&self) -> &'a T { |
nothing calls this directly
no outgoing calls
no test coverage detected