Identifier

Struct Identifier 

Source
pub struct Identifier { /* private fields */ }
Expand description

An identifier, like minecraft:stone or brigadier:number.

All registry variants can be converted to an identifier.

This was formerly called a ResourceLocation.

Implementations§

Source§

impl Identifier

Source

pub fn new(resource_string: impl Into<String>) -> Identifier

Source

pub fn namespace(&self) -> &str

Source

pub fn path(&self) -> &str

Trait Implementations§

Source§

impl AzaleaRead for Identifier

Source§

fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError>

Source§

impl AzaleaWrite for Identifier

Source§

fn azalea_write(&self, buf: &mut impl Write) -> Result<()>

Source§

impl Clone for Identifier

Source§

fn clone(&self) -> Identifier

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Identifier

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Identifier

Source§

fn default() -> Identifier

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Identifier

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Identifier

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a Identifier> for BannerPatternKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for BiomeKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for CatVariantKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for ChatKindKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for ChickenVariantKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for CowVariantKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for DamageKindKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for DialogKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for DimensionKindKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for EnchantmentKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for EnchantmentProviderKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for FrogVariantKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for InstrumentKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for JukeboxSongKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for PaintingVariantKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for PigVariantKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for RecipeKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for TestEnvironmentKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for TestInstanceKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for TimelineKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for TrimMaterialKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for TrimPatternKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for WolfSoundVariantKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for WolfVariantKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for ZombieNautilusVariantKey<&'a Identifier>

Source§

fn from(ident: &'a Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<&str> for Identifier

Source§

fn from(s: &str) -> Self

Converts to this type from the input type.
Source§

impl From<BannerPatternKey<&Identifier>> for Identifier

Source§

fn from(registry: BannerPatternKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<BannerPatternKey> for Identifier

Source§

fn from(registry: BannerPatternKey) -> Self

Converts to this type from the input type.
Source§

impl From<BiomeKey<&Identifier>> for Identifier

Source§

fn from(registry: BiomeKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<BiomeKey> for Identifier

Source§

fn from(registry: BiomeKey) -> Self

Converts to this type from the input type.
Source§

impl From<CatVariantKey<&Identifier>> for Identifier

Source§

fn from(registry: CatVariantKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<CatVariantKey> for Identifier

Source§

fn from(registry: CatVariantKey) -> Self

Converts to this type from the input type.
Source§

impl From<ChatKindKey<&Identifier>> for Identifier

Source§

fn from(registry: ChatKindKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<ChatKindKey> for Identifier

Source§

fn from(registry: ChatKindKey) -> Self

Converts to this type from the input type.
Source§

impl From<ChickenVariantKey<&Identifier>> for Identifier

Source§

fn from(registry: ChickenVariantKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<ChickenVariantKey> for Identifier

Source§

fn from(registry: ChickenVariantKey) -> Self

Converts to this type from the input type.
Source§

impl From<CowVariantKey<&Identifier>> for Identifier

Source§

fn from(registry: CowVariantKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<CowVariantKey> for Identifier

Source§

fn from(registry: CowVariantKey) -> Self

Converts to this type from the input type.
Source§

impl From<DamageKindKey<&Identifier>> for Identifier

Source§

fn from(registry: DamageKindKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<DamageKindKey> for Identifier

Source§

fn from(registry: DamageKindKey) -> Self

Converts to this type from the input type.
Source§

impl From<DialogKey<&Identifier>> for Identifier

Source§

fn from(registry: DialogKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<DialogKey> for Identifier

Source§

fn from(registry: DialogKey) -> Self

Converts to this type from the input type.
Source§

impl From<DimensionKindKey<&Identifier>> for Identifier

Source§

fn from(registry: DimensionKindKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<DimensionKindKey> for Identifier

Source§

fn from(registry: DimensionKindKey) -> Self

Converts to this type from the input type.
Source§

impl From<EnchantmentKey<&Identifier>> for Identifier

Source§

fn from(registry: EnchantmentKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<EnchantmentKey> for Identifier

Source§

fn from(registry: EnchantmentKey) -> Self

Converts to this type from the input type.
Source§

impl From<EnchantmentProviderKey<&Identifier>> for Identifier

Source§

fn from(registry: EnchantmentProviderKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<EnchantmentProviderKey> for Identifier

Source§

fn from(registry: EnchantmentProviderKey) -> Self

Converts to this type from the input type.
Source§

impl From<FrogVariantKey<&Identifier>> for Identifier

Source§

fn from(registry: FrogVariantKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<FrogVariantKey> for Identifier

Source§

fn from(registry: FrogVariantKey) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for BannerPatternKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for BiomeKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for CatVariantKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for ChatKindKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for ChickenVariantKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for CowVariantKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for DamageKindKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for DialogKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for DimensionKindKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for EnchantmentKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for EnchantmentProviderKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for FrogVariantKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for InstrumentKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for JukeboxSongKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for PaintingVariantKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for PigVariantKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for RecipeKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for TestEnvironmentKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for TestInstanceKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for TimelineKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for TrimMaterialKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for TrimPatternKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for WolfSoundVariantKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for WolfVariantKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<Identifier> for ZombieNautilusVariantKey

Source§

fn from(ident: Identifier) -> Self

Converts to this type from the input type.
Source§

impl From<InstrumentKey<&Identifier>> for Identifier

Source§

fn from(registry: InstrumentKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<InstrumentKey> for Identifier

Source§

fn from(registry: InstrumentKey) -> Self

Converts to this type from the input type.
Source§

impl From<JukeboxSongKey<&Identifier>> for Identifier

Source§

fn from(registry: JukeboxSongKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<JukeboxSongKey> for Identifier

Source§

fn from(registry: JukeboxSongKey) -> Self

Converts to this type from the input type.
Source§

impl From<PaintingVariantKey<&Identifier>> for Identifier

Source§

fn from(registry: PaintingVariantKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<PaintingVariantKey> for Identifier

Source§

fn from(registry: PaintingVariantKey) -> Self

Converts to this type from the input type.
Source§

impl From<PigVariantKey<&Identifier>> for Identifier

Source§

fn from(registry: PigVariantKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<PigVariantKey> for Identifier

Source§

fn from(registry: PigVariantKey) -> Self

Converts to this type from the input type.
Source§

impl From<RecipeKey<&Identifier>> for Identifier

Source§

fn from(registry: RecipeKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<RecipeKey> for Identifier

Source§

fn from(registry: RecipeKey) -> Self

Converts to this type from the input type.
Source§

impl From<TestEnvironmentKey<&Identifier>> for Identifier

Source§

fn from(registry: TestEnvironmentKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<TestEnvironmentKey> for Identifier

Source§

fn from(registry: TestEnvironmentKey) -> Self

Converts to this type from the input type.
Source§

impl From<TestInstanceKey<&Identifier>> for Identifier

Source§

fn from(registry: TestInstanceKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<TestInstanceKey> for Identifier

Source§

fn from(registry: TestInstanceKey) -> Self

Converts to this type from the input type.
Source§

impl From<TimelineKey<&Identifier>> for Identifier

Source§

fn from(registry: TimelineKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<TimelineKey> for Identifier

Source§

fn from(registry: TimelineKey) -> Self

Converts to this type from the input type.
Source§

impl From<TrimMaterialKey<&Identifier>> for Identifier

Source§

fn from(registry: TrimMaterialKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<TrimMaterialKey> for Identifier

Source§

fn from(registry: TrimMaterialKey) -> Self

Converts to this type from the input type.
Source§

impl From<TrimPatternKey<&Identifier>> for Identifier

Source§

fn from(registry: TrimPatternKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<TrimPatternKey> for Identifier

Source§

fn from(registry: TrimPatternKey) -> Self

Converts to this type from the input type.
Source§

impl From<WolfSoundVariantKey<&Identifier>> for Identifier

Source§

fn from(registry: WolfSoundVariantKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<WolfSoundVariantKey> for Identifier

Source§

fn from(registry: WolfSoundVariantKey) -> Self

Converts to this type from the input type.
Source§

impl From<WolfVariantKey<&Identifier>> for Identifier

Source§

fn from(registry: WolfVariantKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<WolfVariantKey> for Identifier

Source§

fn from(registry: WolfVariantKey) -> Self

Converts to this type from the input type.
Source§

impl From<ZombieNautilusVariantKey<&Identifier>> for Identifier

Source§

fn from(registry: ZombieNautilusVariantKey<&Identifier>) -> Self

Converts to this type from the input type.
Source§

impl From<ZombieNautilusVariantKey> for Identifier

Source§

fn from(registry: ZombieNautilusVariantKey) -> Self

Converts to this type from the input type.
Source§

impl FromNbtTag for Identifier

Source§

fn from_nbt_tag(tag: NbtTag<'_, '_>) -> Option<Self>

§

fn from_optional_nbt_tag( tag: Option<NbtTag<'_, '_>>, ) -> Result<Option<Self>, DeserializeError>

Source§

impl FromStr for Identifier

Source§

type Err = &'static str

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Identifier

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Identifier

Source§

fn eq(&self, other: &Identifier) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Identifier

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl ToNbtTag for Identifier

Source§

fn to_nbt_tag(self) -> NbtTag

§

fn to_optional_nbt_tag(self) -> Option<NbtTag>

Source§

impl Eq for Identifier

Source§

impl StructuralPartialEq for Identifier

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,