pub trait WrapTo {
type Wrapped: Unwrap<Unwrapped = Self>;
}Expand description
The wider (vector) form of a scalar request struct - the inverse of [Unwrap] for these structs.
Unwrap only maps vector -> scalar (type Unwrapped), and Rust cannot invert an associated type,
so this names the forward (scalar -> vector) direction. It is what lets the Scalar* math-trait
layer take a scalar request (CarlsonRf<f64>), wrap it into a width-1 vector request
(CarlsonRf<Vector<f64>>), evaluate on the (vector-only) backend, then unwrap the scalar result -
without implementing the backend twice. Implemented only for scalar-element request structs.
Required Associated Types§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".