pub struct RuleRegistry { /* private fields */ }Expand description
A registry of differentiation rules, keyed by (lower-cased) function name.
Built-ins populate it; users extend it with RuleRegistry::register
(design.md §3.2 — the “extensible rule registry” decision).
Implementations§
Source§impl RuleRegistry
impl RuleRegistry
Sourcepub fn new() -> Self
pub fn new() -> Self
A registry populated with the built-in v1 rule set: + - * /, the unary
chain rule for the trig / inverse-trig / exp / log / hyperbolic set plus
abs, and power with a constant base or exponent (design.md §3.6).
Sourcepub fn unary_names(&self) -> Vec<String>
pub fn unary_names(&self) -> Vec<String>
The unary function names this registry has a rule for, sorted.
Read out of the registry rather than restated, so it cannot fall behind what is implemented — and so a test asking “is every rule covered?” is asking the engine instead of a second list that has to be maintained alongside the first. Includes rules a caller registered.
Trait Implementations§
Source§impl Clone for RuleRegistry
impl Clone for RuleRegistry
Source§fn clone(&self) -> RuleRegistry
fn clone(&self) -> RuleRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RuleRegistry
impl !UnwindSafe for RuleRegistry
impl Freeze for RuleRegistry
impl Send for RuleRegistry
impl Sync for RuleRegistry
impl Unpin for RuleRegistry
impl UnsafeUnpin for RuleRegistry
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