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