#[cfg(feature = "link")]
mod owned_handle;
mod uhandle;
mod uptr;
use std::fmt::Debug;
pub trait LVCopy {}
impl<T: Copy> LVCopy for T {}
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
#[repr(transparent)]
#[doc(hidden)]
pub struct MagicCookie(u32);
#[cfg(feature = "link")]
pub use owned_handle::OwnedUHandle;
pub use uhandle::UHandle;
pub use uptr::UPtr;
fn fmt_handle<T: Debug + ?Sized>(
label: &str,
handle: &UHandle<T>,
f: &mut std::fmt::Formatter<'_>,
) -> std::fmt::Result {
match unsafe { handle.as_ref() } {
Ok(inner) => write!(f, "{label}({inner:?})"),
Err(_) => write!(f, "{label}(Invalid)"),
}
}