pub struct VerbRegistryBuilder { /* private fields */ }Expand description
Builder for constructing a VerbRegistry.
Packs are registered here; once .build() is called the registry is
immutable and cheaply cloneable.
Implementations§
Source§impl VerbRegistryBuilder
impl VerbRegistryBuilder
pub fn new() -> Self
Sourcepub fn register<P: Pack + PackRuntime + 'static>(
&mut self,
pack: P,
) -> &mut Self
pub fn register<P: Pack + PackRuntime + 'static>( &mut self, pack: P, ) -> &mut Self
Register a pack. The bound P: Pack + PackRuntime ensures the pack
declares vocabulary via Pack consts alongside runtime dispatch.
Sourcepub fn build(self) -> VerbRegistry
pub fn build(self) -> VerbRegistry
Consume the builder and produce an immutable, cloneable registry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VerbRegistryBuilder
impl !RefUnwindSafe for VerbRegistryBuilder
impl Send for VerbRegistryBuilder
impl Sync for VerbRegistryBuilder
impl Unpin for VerbRegistryBuilder
impl UnsafeUnpin for VerbRegistryBuilder
impl !UnwindSafe for VerbRegistryBuilder
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