pub struct ArrayFunctionRegistry { /* private fields */ }
Expand description
Registry of all array functions with dispatch caching.
Implementations§
Source§impl ArrayFunctionRegistry
impl ArrayFunctionRegistry
Sourcepub fn register(&mut self, func: ArrayFunction)
pub fn register(&mut self, func: ArrayFunction)
Register a new array function.
Sourcepub fn get(&self, name: &str) -> Option<&ArrayFunction>
pub fn get(&self, name: &str) -> Option<&ArrayFunction>
Get an array function by name.
Sourcepub fn all_functions(&self) -> Vec<&ArrayFunction>
pub fn all_functions(&self) -> Vec<&ArrayFunction>
Get all registered functions.
Sourcepub fn get_cached_dispatch(
&self,
func_name: &'static str,
types: &[TypeId],
) -> Option<&DispatchCacheEntry>
pub fn get_cached_dispatch( &self, func_name: &'static str, types: &[TypeId], ) -> Option<&DispatchCacheEntry>
Get cached dispatch entry for optimization
Sourcepub fn cache_dispatch_result(
&mut self,
func_name: &'static str,
types: Vec<TypeId>,
impl_type: TypeId,
)
pub fn cache_dispatch_result( &mut self, func_name: &'static str, types: Vec<TypeId>, impl_type: TypeId, )
Cache dispatch result for future optimization
Sourcepub fn update_cache_hit(&mut self, func_name: &'static str, types: &[TypeId])
pub fn update_cache_hit(&mut self, func_name: &'static str, types: &[TypeId])
Update cache hit count for an entry
Sourcepub fn cache_stats(&self) -> HashMap<String, u64>
pub fn cache_stats(&self) -> HashMap<String, u64>
Get cache statistics for monitoring
Trait Implementations§
Source§impl Debug for ArrayFunctionRegistry
impl Debug for ArrayFunctionRegistry
Auto Trait Implementations§
impl Freeze for ArrayFunctionRegistry
impl !RefUnwindSafe for ArrayFunctionRegistry
impl Send for ArrayFunctionRegistry
impl Sync for ArrayFunctionRegistry
impl Unpin for ArrayFunctionRegistry
impl !UnwindSafe for ArrayFunctionRegistry
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more