Struct datatypes::Identifier
source · pub struct Identifier(/* private fields */);Expand description
Represents a namespaced location in the form of namespace:value.
If the namespace is not provided, it defaults to minecraft, meaning thing
is equivalent to minecraft:thing. Custom content should always be in its own
namespace, not the default one.
Both the namespace and value can consist of lowercase alphanumeric characters (a-z and 0-9), dot (.), dash (-), and underscore (_). Additionally, values can use slash (/). The naming convention is lower_case_with_underscores.
For ease of determining whether a namespace or value is valid, here are regular expressions for each:
- Namespace:
[a-z0-9.-_] - Value:
[a-z0-9.-_/]
Trait Implementations§
source§impl Clone for Identifier
impl Clone for Identifier
source§fn clone(&self) -> Identifier
fn clone(&self) -> Identifier
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl DataReader for Identifier
impl DataReader for Identifier
source§impl DataWriter for Identifier
impl DataWriter for Identifier
source§impl ImportantFunctions for Identifier
impl ImportantFunctions for Identifier
Auto Trait Implementations§
impl Freeze for Identifier
impl RefUnwindSafe for Identifier
impl Send for Identifier
impl Sync for Identifier
impl Unpin for Identifier
impl UnwindSafe for Identifier
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more