opencv/manual/types/
abstract_ref.rs1use std::ffi::c_void;
2use std::marker::PhantomData;
3
4use crate::traits::Boxed;
5
6pub struct AbstractRefMut<'r, T: ?Sized> {
7 ptr: *mut c_void,
8 _d: PhantomData<&'r mut T>,
9}
10
11impl<T: ?Sized> Boxed for AbstractRefMut<'_, T> {
12 #[inline]
13 unsafe fn from_raw(ptr: *mut c_void) -> Self {
14 Self { ptr, _d: PhantomData }
15 }
16
17 #[inline]
18 fn into_raw(self) -> *mut c_void {
19 self.ptr
20 }
21
22 #[inline]
23 fn as_raw(&self) -> *const c_void {
24 self.ptr
25 }
26
27 #[inline]
28 fn as_raw_mut(&mut self) -> *mut c_void {
29 self.ptr
30 }
31}