pub trait RegistryHolderEntry:
RegistryEntry
+ Debug
+ Send
+ Sync {
type Value: Clone + Debug + PartialEq + Send + Sync + WriteTo + ReadFrom + ToNbtTag + FromNbtTag + HashComponent + 'static;
const REGISTRY_NAME: &'static str;
// Required methods
fn holder_value(&self) -> &Self::Value;
fn holder_by_id(id: usize) -> Option<&'static Self>;
fn holder_by_key(key: &Identifier) -> Option<&'static Self>;
}Expand description
Registry operations and direct value type required by RegistryHolder.
Required Associated Constants§
Sourceconst REGISTRY_NAME: &'static str
const REGISTRY_NAME: &'static str
Human-readable registry name used in codec errors.
Required Associated Types§
Required Methods§
Sourcefn holder_value(&self) -> &Self::Value
fn holder_value(&self) -> &Self::Value
Returns the entry’s registry-independent value.
Sourcefn holder_by_id(id: usize) -> Option<&'static Self>
fn holder_by_id(id: usize) -> Option<&'static Self>
Looks up a registry reference by its protocol ID.
Sourcefn holder_by_key(key: &Identifier) -> Option<&'static Self>
fn holder_by_key(key: &Identifier) -> Option<&'static Self>
Looks up a registry reference by its key.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".