Trait RepositoryItem

Source
pub trait RepositoryItem:
    Internal
    + Send
    + Sync
    + 'static {
    const NAME: &'static str;

    // Provided method
    fn type_id() -> TypeId { ... }
}
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§

Source

const NAME: &'static str

The name of the type implementing this trait.

Provided Methods§

Source

fn type_id() -> TypeId

Returns the TypeId of the type implementing this trait.

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.

Implementors§