Skip to main content

RegistryEntry

Trait RegistryEntry 

Source
pub trait RegistryEntry: 'static {
    // Required methods
    fn key(&self) -> &Identifier;
    fn try_id(&self) -> Option<usize>;

    // Provided method
    fn id(&self) -> usize { ... }
}
Expand description

Trait for types stored in a registry, allowing self-lookup of their numeric ID.

Required Methods§

Source

fn key(&self) -> &Identifier

Source

fn try_id(&self) -> Option<usize>

Provided Methods§

Source

fn id(&self) -> usize

§Panics

Panics if the entry is not registered.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl RegistryEntry for Attribute

Source§

impl RegistryEntry for BannerPattern

Source§

impl RegistryEntry for Biome

Source§

impl RegistryEntry for Block

Source§

impl RegistryEntry for BlockEntityType

Source§

impl RegistryEntry for CatSoundVariant

Source§

impl RegistryEntry for CatVariant

Source§

impl RegistryEntry for ChatType

Source§

impl RegistryEntry for ChickenSoundVariant

Source§

impl RegistryEntry for ChickenVariant

Source§

impl RegistryEntry for ComponentEntry

Source§

impl RegistryEntry for ConfiguredCarver

Source§

impl RegistryEntry for ConfiguredFeature

Source§

impl RegistryEntry for CowSoundVariant

Source§

impl RegistryEntry for CowVariant

Source§

impl RegistryEntry for CraftingRecipe

Source§

impl RegistryEntry for DamageType

Source§

impl RegistryEntry for Dialog

Source§

impl RegistryEntry for DimensionType

Source§

impl RegistryEntry for Enchantment

Source§

impl RegistryEntry for EntityDataSerializerEntry

Source§

impl RegistryEntry for EntityType

Source§

impl RegistryEntry for Fluid

Source§

impl RegistryEntry for FrogVariant

Source§

impl RegistryEntry for GameEvent

Source§

impl RegistryEntry for GameRule

Source§

impl RegistryEntry for Instrument

Source§

impl RegistryEntry for Item

Source§

impl RegistryEntry for JukeboxSong

Source§

impl RegistryEntry for LootTable

Source§

impl RegistryEntry for MenuType

Source§

impl RegistryEntry for MobEffect

Source§

impl RegistryEntry for PaintingVariant

Source§

impl RegistryEntry for ParticleType

Source§

impl RegistryEntry for PigSoundVariant

Source§

impl RegistryEntry for PigVariant

Source§

impl RegistryEntry for PlacedFeature

Source§

impl RegistryEntry for PointOfInterestType

Source§

impl RegistryEntry for SoundEvent

Source§

impl RegistryEntry for StructureData

Source§

impl RegistryEntry for StructureProcessorList

Source§

impl RegistryEntry for Timeline

Source§

impl RegistryEntry for TrimMaterial

Source§

impl RegistryEntry for TrimPattern

Source§

impl RegistryEntry for VillagerProfession

Source§

impl RegistryEntry for VillagerType

Source§

impl RegistryEntry for WolfSoundVariant

Source§

impl RegistryEntry for WolfVariant

Source§

impl RegistryEntry for WorldClock

Source§

impl RegistryEntry for ZombieNautilusVariant