pub struct ResourceLocation {
pub namespace: String,
pub path: String,
}
Fields§
§namespace: String
§path: String
Implementations§
Source§impl ResourceLocation
impl ResourceLocation
pub fn new(resource_string: &str) -> ResourceLocation
Trait Implementations§
Source§impl Clone for ResourceLocation
impl Clone for ResourceLocation
Source§fn clone(&self) -> ResourceLocation
fn clone(&self) -> ResourceLocation
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 Debug for ResourceLocation
impl Debug for ResourceLocation
Source§impl<'de> Deserialize<'de> for ResourceLocation
impl<'de> Deserialize<'de> for ResourceLocation
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ResourceLocation, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ResourceLocation, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ResourceLocation
impl Display for ResourceLocation
Source§impl FromNbtTag for ResourceLocation
impl FromNbtTag for ResourceLocation
fn from_nbt_tag(tag: NbtTag<'_, '_>) -> Option<ResourceLocation>
fn from_optional_nbt_tag( tag: Option<NbtTag<'_, '_>>, ) -> Result<Option<Self>, DeserializeError>
Source§impl FromStr for ResourceLocation
impl FromStr for ResourceLocation
Source§impl Hash for ResourceLocation
impl Hash for ResourceLocation
Source§impl McBufReadable for ResourceLocation
impl McBufReadable for ResourceLocation
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<ResourceLocation, BufReadError>
Source§impl McBufWritable for ResourceLocation
impl McBufWritable for ResourceLocation
Source§impl PartialEq for ResourceLocation
impl PartialEq for ResourceLocation
Source§impl Serialize for ResourceLocation
impl Serialize for ResourceLocation
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl ToNbtTag for ResourceLocation
impl ToNbtTag for ResourceLocation
fn to_nbt_tag(self) -> NbtTag
fn to_optional_nbt_tag(self) -> Option<NbtTag>
impl Eq for ResourceLocation
impl StructuralPartialEq for ResourceLocation
Auto Trait Implementations§
impl Freeze for ResourceLocation
impl RefUnwindSafe for ResourceLocation
impl Send for ResourceLocation
impl Sync for ResourceLocation
impl Unpin for ResourceLocation
impl UnwindSafe for ResourceLocation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any
.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.