pub struct ClosureRegistry { /* private fields */ }Expand description
A registry that maps string names to closures.
Implementations§
Source§impl ClosureRegistry
impl ClosureRegistry
Sourcepub fn unregister(&mut self, name: &str) -> Option<Closure>
pub fn unregister(&mut self, name: &str) -> Option<Closure>
Remove a closure.
Sourcepub fn access_count(&self, name: &str) -> u64
pub fn access_count(&self, name: &str) -> u64
Access count for a name.
Sourcepub fn most_accessed(&self) -> Option<&str>
pub fn most_accessed(&self) -> Option<&str>
Most accessed closure.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClosureRegistry
impl RefUnwindSafe for ClosureRegistry
impl Send for ClosureRegistry
impl Sync for ClosureRegistry
impl Unpin for ClosureRegistry
impl UnsafeUnpin for ClosureRegistry
impl UnwindSafe for ClosureRegistry
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