Struct CustomOwner
#[repr(transparent)]
pub struct CustomOwner(pub(in ::io::error) NonNull<Custom>);
Effectively a Box<Custom> without alloc. The Custom holds the call to free this pointer.
Fields
0: NonNull<Custom>
Implementations
impl CustomOwner
unsafe fn from_raw(custom: NonNull<Custom>) -> CustomOwnerSafety
custommust point to validCustom.- The
outer_dropof the providedcustommust be the drop function for this pointer.
fn into_raw(self) -> NonNull<Custom>fn custom_ref(&self) -> &Customfn custom_mut(&mut self) -> &mut Custom
Trait Implementations
impl Debug for CustomOwner
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Drop for CustomOwner
fn drop(&mut self)