#[repr(C)]pub struct CBox<'a, T: 'a> { /* private fields */ }
Expand description
FFI-safe box
This box has a static self reference, alongside a custom drop function.
The drop function can be called from anywhere, it will free on correct allocator internally.
Trait Implementations§
source§impl<T> IntoInner for CBox<'_, T>
impl<T> IntoInner for CBox<'_, T>
type InnerTarget = T
source§unsafe fn into_inner(self) -> Self::InnerTarget
unsafe fn into_inner(self) -> Self::InnerTarget
Consume self and return inner type. Read more
source§impl<'a, T> Opaquable for CBox<'a, T>
impl<'a, T> Opaquable for CBox<'a, T>
type OpaqueTarget = CBox<'a, c_void>
source§fn into_opaque(self) -> Self::OpaqueTarget
fn into_opaque(self) -> Self::OpaqueTarget
Transform self into an opaque version of the trait object. Read more
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for CBox<'a, T>where T: RefUnwindSafe,
impl<'a, T> Send for CBox<'a, T>where T: Send,
impl<'a, T> Sync for CBox<'a, T>where T: Sync,
impl<'a, T> Unpin for CBox<'a, T>
impl<'a, T> !UnwindSafe for CBox<'a, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more