Allow conjuring private::Internal (#2118)

* Allow conjuring private::Internal

* Hide reexport
This commit is contained in:
Dániel Buga 2024-09-10 16:25:21 +02:00 committed by GitHub
parent 7332f5834a
commit dafad9b487
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -291,9 +291,32 @@ impl crate::private::Sealed for Async {}
pub(crate) mod private {
pub trait Sealed {}
#[non_exhaustive]
#[doc(hidden)]
/// Magical incantation to gain access to internal APIs.
pub struct Internal;
impl Internal {
/// Obtain magical powers to access internal APIs.
///
/// # Safety
///
/// By calling this function, you accept that you are using an internal
/// API that is not guaranteed to be documented, stable, working
/// and may change at any time.
///
/// You declare that you have tried to look for other solutions, that
/// you have opened a feature request or an issue to discuss the
/// need for this function.
pub unsafe fn conjure() -> Self {
Self
}
}
}
#[doc(hidden)]
pub use private::Internal;
/// Marker trait for types that can be safely used in `#[ram(persistent)]`.
///
/// # Safety