Skip to main content

RegistryHolderSetEntry

Trait RegistryHolderSetEntry 

Source
pub trait RegistryHolderSetEntry:
    RegistryEntry
    + Debug
    + Send
    + Sync {
    const REGISTRY_NAME: &'static str;

    // Required methods
    fn holder_set_by_id(id: usize) -> Option<&'static Self>;
    fn holder_set_by_key(key: &Identifier) -> Option<&'static Self>;
    fn holder_set_tag_exists(tag: &Identifier) -> bool;
    fn holder_set_tag_contains(entry: &'static Self, tag: &Identifier) -> bool;
}
Expand description

Registry operations required by a RegistryHolderSet.

The trait keeps the holder-set codec independent from Steel’s concrete registries. Plugin-owned entry types can provide the same operations through their own registry implementation.

Required Associated Constants§

Source

const REGISTRY_NAME: &'static str

Human-readable registry name used in codec errors.

Required Methods§

Source

fn holder_set_by_id(id: usize) -> Option<&'static Self>

Looks up an entry by its protocol registry ID.

Source

fn holder_set_by_key(key: &Identifier) -> Option<&'static Self>

Looks up an entry by its registry key.

Source

fn holder_set_tag_exists(tag: &Identifier) -> bool

Returns whether the registry contains this tag.

Source

fn holder_set_tag_contains(entry: &'static Self, tag: &Identifier) -> bool

Returns whether an entry belongs to this tag.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§