Crate cached_pair

Source

Structs§

BoxedFnConverter
A converter that uses boxed closures for conversions. This is similar to FnConverter but uses trait objects, making its type always descriptable.
FnConverter
A converter that uses closures for conversions. This is useful when you want to provide custom conversion logic without implementing the TryFrom trait.
Pair
A pair of values where one can be converted to the other.
StdConverter
A standard converter that uses the TryFrom trait for conversions. This is the default converter used by Pair when no converter is specified. Note that this converter requires the TryFrom<&L> for R and TryFrom<&R> for L implementations, which are not typically implemented by the library authors.

Enums§

EitherOrBoth
Re-exporting from itertools crate. Value that either holds a single A or B, or both.

Traits§

Converter
A trait for converting between two types. This trait is used by Pair to convert between its left and right values.

Functions§

boxed_fn_converter
Creates a new BoxedFnConverter from two closures. This is a convenience function for creating a converter that uses boxed closures for conversions.
fn_converter
Creates a new FnConverter from two functions. This is a convenience function for creating a converter that uses closures for conversions. Note that the type of the converter is not descriptable if you use the closure as an argument. Use boxed_fn_converter instead if you need a descriptable type.