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