pub trait RepositoryItem:
Internal
+ Send
+ Sync
+ 'static {
const NAME: &'static str;
// Provided methods
fn type_id() -> TypeId { ... }
fn data() -> RepositoryItemData { ... }
}
Expand description
This trait is used to mark types that can be stored in a repository. It should not be implemented manually; instead, users should use the crate::register_repository_item macro to register their item types.
Required Associated Constants§
Provided Methods§
Sourcefn data() -> RepositoryItemData
fn data() -> RepositoryItemData
Returns metadata about the repository item type.
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.