Expand description
§Function Types
Provides Rust implementations of function traits for computing output values from input references. Functions borrow input values (not consuming them) and produce output values.
It is similar to the Fn(&T) -> R trait in the standard library.
This module provides the Function<T, R> trait and three
implementations:
BoxFunction: Single ownership, not cloneableArcFunction: Thread-safe shared ownership, cloneableRcFunction: Single-threaded shared ownership, cloneable
§Author
Haixing Hu
Structs§
- ArcConditional
Function - ArcConditionalFunction struct
- ArcFunction
- ArcFunction - thread-safe function wrapper
- BoxConditional
Function - BoxConditionalFunction struct
- BoxFunction
- BoxFunction - function wrapper based on
Box<dyn Fn> - RcConditional
Function - RcConditionalFunction struct
- RcFunction
- RcFunction - single-threaded function wrapper
Traits§
- FnFunction
Ops - Extension trait for closures implementing the base function trait
- Function
- Function trait - computes output from input reference