#[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
sourceimpl<T> IntoInner for CBox<'_, T>
impl<T> IntoInner for CBox<'_, T>
type InnerTarget = T
sourceunsafe fn into_inner(self) -> Self::InnerTarget
unsafe fn into_inner(self) -> Self::InnerTarget
Consume self and return inner type. Read more
sourceimpl<'a, T> Opaquable for CBox<'a, T>
impl<'a, T> Opaquable for CBox<'a, T>
type OpaqueTarget = CBox<'a, c_void>
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more