typewit::type_fn

Type Alias UncallFn

Source
pub type UncallFn<F, Ret> = <F as RevTypeFn<Ret>>::Arg;
Expand description

Queries the argument to a F: TypeFn from its return value.

ยงExample

use typewit::UncallFn;
 
let vect = vec![3u32, 5, 8];
let value: UncallFn<VecFn, Vec<u32>> = vect[1];
assert_eq!(value, 5u32);
 
typewit::inj_type_fn!{
    struct VecFn;
    impl<T> T => Vec<T>
}