pub struct Registry { /* private fields */ }Expand description
The runtime registry of built-in and user-registered spreadsheet functions.
Implementations§
Source§impl Registry
impl Registry
pub fn new() -> Self
Sourcepub fn register_eager(&mut self, name: &str, f: EagerFn, meta: FunctionMeta)
pub fn register_eager(&mut self, name: &str, f: EagerFn, meta: FunctionMeta)
Register a user-facing eager function with metadata.
Appears in list_functions().
Sourcepub fn register_lazy(&mut self, name: &str, f: LazyFn, meta: FunctionMeta)
pub fn register_lazy(&mut self, name: &str, f: LazyFn, meta: FunctionMeta)
Register a user-facing lazy function with metadata.
Appears in list_functions().
Sourcepub fn register_internal(&mut self, name: &str, f: EagerFn)
pub fn register_internal(&mut self, name: &str, f: EagerFn)
Register an internal/compiler-only eager function without metadata.
Never appears in list_functions().
Sourcepub fn register_internal_lazy(&mut self, name: &str, f: LazyFn)
pub fn register_internal_lazy(&mut self, name: &str, f: LazyFn)
Register an internal/compiler-only lazy function without metadata.
Never appears in list_functions().
pub fn get(&self, name: &str) -> Option<&FunctionKind>
Sourcepub fn list_functions(&self) -> impl Iterator<Item = (&str, &FunctionMeta)>
pub fn list_functions(&self) -> impl Iterator<Item = (&str, &FunctionMeta)>
Iterate all user-facing functions with their metadata. The registry is the single source of truth — this can never drift.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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