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>) -> CustomOwner

Safety

  • custom must point to valid Custom.
  • The outer_drop of the provided custom must be the drop function for this pointer.
fn into_raw(self) -> NonNull<Custom>
fn custom_ref(&self) -> &Custom
fn 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)

impl Send for CustomOwner

impl Sync for CustomOwner