Macro lending_iterator::higher_kinded_types::HKT
source · pub macro HKT { ( <$lt:lifetime> => $T:ty $(,)? ) => { ... }, ( $(@docs.rs "Lifetime elision case: use `'_` or `&[mut] …` to replace the \ so-elided lifetimes with a HKT-higher-order one." )? $T:ty $(,)? ) => { ... }, }
Expand description
Ad-hoc impl HKT
type.
See the module documentation for more info for more info.
Examples
-
use ::lending_iterator::higher_kinded_types::HKT; // All these three define the same `HKT` type: type StrRef = HKT!(<'any> => &'any str); type StrRefElided = HKT!(&str); type StrRefElided2 = HKT!(&'_ str); type LifetimeParamsWorkToo = HKT!(::std::borrow::Cow<'_, str>);