Skip to main content

ExtF1

Trait ExtF1 

Source
pub trait ExtF1:
    Debug
    + Clone
    + PartialEq {
    // Required methods
    fn to_fn(&self) -> fn(f64) -> f64;
    fn names(&self) -> &[&str];

    // Provided method
    fn list(&self) -> String { ... }
}
Expand description

Trait for custom single-argument functions.

Required Methods§

Source

fn to_fn(&self) -> fn(f64) -> f64

Resolve to a function pointer.

Source

fn names(&self) -> &[&str]

All function names for display.

Provided Methods§

Source

fn list(&self) -> String

List all function names.

The default implementation returns the elements of Self::names separated by commas.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§