#[repr(C)] #[must_use] pub struct OwnedPtr { ptr: *mut T, } #[repr(C, u8)] #[must_use] pub enum MaybeOwnedPtr { Owned(*mut T), None, } #[no_mangle] #[must_use] pub extern "C" fn maybe_consume(input: OwnedPtr) -> MaybeOwnedPtr { }