pub trait SuppressedDrop: Sealed {
type Inner;
// Required methods
fn new(inner: Self::Inner) -> Self;
fn as_ref(&self) -> &Self::Inner;
fn as_mut(&mut self) -> &mut Self::Inner;
fn into_inner(self) -> Self::Inner;
}Expand description
Sealed trait that marks a type with a suppressed Drop implementation.
Useful for constraining your storage items types by this bound to make sure they won’t run drop when stored.
Required Associated Types§
Required Methods§
fn new(inner: Self::Inner) -> Self
fn as_ref(&self) -> &Self::Inner
fn as_mut(&mut self) -> &mut Self::Inner
fn into_inner(self) -> Self::Inner
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.