chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
use super::*;
use core::mem::transmute_copy;
#[doc(hidden)]
pub enum ParamValue<T: Type<T>> {
Owned(T),
Borrowed(T::Abi),
}
impl<T: Type<T>> ParamValue<T> {
// TODO: replace with `borrow` in windows-bindgen
pub fn abi(&self) -> T::Abi {
unsafe {
match self {
Self::Owned(item) => transmute_copy(item),
Self::Borrowed(borrowed) => transmute_copy(borrowed),
}
}
}
pub fn borrow(&self) -> Ref<'_, T> {
unsafe { transmute_copy(&self.abi()) }
}
}