pub struct BlockEntityTypeRegistry {
block_entity_types_by_id: Vec<BlockEntityTypeRef>,
block_entity_types_by_key: FxHashMap<Identifier, usize>,
allows_registering: bool,
}Fields§
§block_entity_types_by_id: Vec<BlockEntityTypeRef>§block_entity_types_by_key: FxHashMap<Identifier, usize>§allows_registering: boolImplementations§
Source§impl BlockEntityTypeRegistry
impl BlockEntityTypeRegistry
pub fn register(&mut self, entry: BlockEntityTypeRef) -> usize
pub fn iter(&self) -> impl Iterator<Item = (usize, BlockEntityTypeRef)> + '_
Trait Implementations§
Source§impl Default for BlockEntityTypeRegistry
impl Default for BlockEntityTypeRegistry
Source§impl RegistryExt for BlockEntityTypeRegistry
impl RegistryExt for BlockEntityTypeRegistry
type Entry = BlockEntityType
fn freeze(&mut self)
fn by_id(&self, id: usize) -> Option<&'static BlockEntityType>
fn by_key(&self, key: &Identifier) -> Option<&'static BlockEntityType>
fn id_from_key(&self, key: &Identifier) -> Option<usize>
fn len(&self) -> usize
fn is_empty(&self) -> bool
Auto Trait Implementations§
impl Freeze for BlockEntityTypeRegistry
impl RefUnwindSafe for BlockEntityTypeRegistry
impl Send for BlockEntityTypeRegistry
impl Sync for BlockEntityTypeRegistry
impl Unpin for BlockEntityTypeRegistry
impl UnsafeUnpin for BlockEntityTypeRegistry
impl UnwindSafe for BlockEntityTypeRegistry
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