pub unsafe trait BlockRefDynamicWithMeta: BlockRefDynamic {
// Required method
fn meta(state_ptr: NonNull<Self::State>) -> NonNull<dyn Any>;
}Expand description
Implements the dynamic logic inside a BlockRef and can be used to
create a BlockRefVTable that provides metadata to callers.
This is an extension of BlockRefDynamic that adds the ability to
retrieve metadata about the memory block.
§Safety
A BlockRef may move between threads and be accessed from any thread, while different
clones of a BlockRef may be accessed concurrently from different threads.
The implementation must accordingly be thread-safe to the degree required to correctly operate under these conditions.
Required Methods§
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.