Trait owned_singleton::Singleton
source · pub unsafe trait Singleton: StableDeref {
type Type;
unsafe fn new() -> Self;
fn get() -> *mut Self::Type;
fn unwrap(self) -> &'static mut Self::Type
where
Self: Sized,
{ ... }
}
Expand description
An owned singleton: a proxy (handle) for a static mut
variable