Index

Trait Index 

Source
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§

Source

type Storage: 'static + Sync + Send

The type used to store the index.

Required Methods§

Source

fn allocate() -> Self::Storage

Allocates the storage (initially empty).

Source

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.

Implementors§