repr(transparent)
it could be useful in FFI
This commit is contained in:
parent
8004044789
commit
f94950afb9
|
|
@ -5,6 +5,7 @@ use std::{
|
||||||
ptr::NonNull,
|
ptr::NonNull,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[repr(transparent)]
|
||||||
pub struct OwnRef<'a, T: ?Sized>(Option<NonNull<T>>, PhantomData<(&'a mut [u8], T)>);
|
pub struct OwnRef<'a, T: ?Sized>(Option<NonNull<T>>, PhantomData<(&'a mut [u8], T)>);
|
||||||
|
|
||||||
impl<T: ?Sized> Drop for OwnRef<'_, T> {
|
impl<T: ?Sized> Drop for OwnRef<'_, T> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user