Struct ItemKey
pub struct ItemKey(/* private fields */);Expand description
An item requested at registration; its load-owned slot identifies the canonical name.
Implementations§
§impl ItemKey
impl ItemKey
pub fn data<M>(
self,
host: &dyn Host,
map: &M,
) -> Result<Option<<M as DataMap>::Value>, DataMapError>
pub fn data<M>( self, host: &dyn Host, map: &M, ) -> Result<Option<<M as DataMap>::Value>, DataMapError>
This item’s value in data map map (Holder.getData), as the server’s data packs and
mods’ files left it: the newest file wins, a #tag entry gives every item in the tag
its value, replace and remove apply, and conditional files count only when their
conditions hold. Ok(None) where the map gives this item no value.
Server side: the server merges the maps when its data loads, on a world’s first open
and after every /reload, and a read sees the last load whole, never a mix of two.
Readable from data_maps_updated on, in the world and while data reloads. A reload
that drops a value drops it here too.
Trait Implementations§
impl Copy for ItemKey
impl DataMapEntry for ItemKey
impl Eq for ItemKey
impl StructuralPartialEq for ItemKey
Auto Trait Implementations§
impl Freeze for ItemKey
impl RefUnwindSafe for ItemKey
impl Send for ItemKey
impl Sync for ItemKey
impl Unpin for ItemKey
impl UnsafeUnpin for ItemKey
impl UnwindSafe for ItemKey
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