Struct LevelKey
pub struct LevelKey(/* private fields */);Expand description
A level’s full namespace:path id, cheap to copy and hash.
Implementations§
§impl LevelKey
impl LevelKey
pub const OVERWORLD: LevelKey
pub const NETHER: LevelKey
pub const END: LevelKey
pub fn parse(id: &str) -> Result<LevelKey, String>
pub fn parse(id: &str) -> Result<LevelKey, String>
Validates as Identifier.parse does; a missing namespace is minecraft.
pub fn builtin_or_overworld(id: &str) -> LevelKey
pub fn builtin_or_overworld(id: &str) -> LevelKey
The Nether or the End for their ids, the Overworld for anything else.
pub fn id(self) -> &'static str
pub fn namespace(self) -> &'static str
pub fn path(self) -> &'static str
Trait Implementations§
impl Copy for LevelKey
impl Eq for LevelKey
impl StructuralPartialEq for LevelKey
Auto Trait Implementations§
impl Freeze for LevelKey
impl RefUnwindSafe for LevelKey
impl Send for LevelKey
impl Sync for LevelKey
impl Unpin for LevelKey
impl UnsafeUnpin for LevelKey
impl UnwindSafe for LevelKey
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