trait AbstractStored: Sized {
type BareTy: Sized;
// Required methods
unsafe fn from_bare(bare_value: Self::BareTy, id: StoreId) -> Self;
fn id(&self) -> Option<StoreId>;
fn into_bare(self) -> Self::BareTy;
// Provided method
fn try_unwrap_into_bare(
self,
expected_store_id: StoreId,
) -> Result<Self::BareTy, RuntimeError> { ... }
}Expand description
A trait for types that might have a StoreId attached to them, so-called
stored types.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn try_unwrap_into_bare(
self,
expected_store_id: StoreId,
) -> Result<Self::BareTy, RuntimeError>
fn try_unwrap_into_bare( self, expected_store_id: StoreId, ) -> Result<Self::BareTy, RuntimeError>
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.