pub trait Index<R: Registry + ?Sized>: 'static {
type Storage: 'static + Sync + Send;
// Required methods
fn allocate() -> Self::Storage;
fn associate(
storage: &mut Self::Storage,
id: RegistrationId<R>,
entry: RegistryEntry<R>,
) -> ControlFlow<()>;
}Expand description
A static index over a registry.
Required Associated Types§
Required Methods§
Sourcefn associate(
storage: &mut Self::Storage,
id: RegistrationId<R>,
entry: RegistryEntry<R>,
) -> ControlFlow<()>
fn associate( storage: &mut Self::Storage, id: RegistrationId<R>, entry: RegistryEntry<R>, ) -> ControlFlow<()>
Inserts a registration into the index. The return value indicates whether to continue building the index or to early-abort.
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.