usesuper::*; use core::ffi::c_void; use core::marker::PhantomData; use core::mem::transmute;
/// A borrowed type with the same memory layout as the type itself that can be used to construct ABI-compatible function signatures. #[repr(transparent)] pubstructRef<'a, T: Type<T>>(T::Abi, PhantomData<&'a T>);
impl<'a, T: Type<T, Default = Option<T>, Abi = *mut c_void>> Ref<'a, T> { /// Converts the argument to a [Result<&T>] reference. pubfn ok(&self) -> Result<&T> { ifself.0.is_null() {
Err(Error::from_hresult(imp::E_POINTER))
} else { unsafe { Ok(transmute::<&*mut c_void, &T>(&>self.0)) }
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.