pub trait CTIf<Condition, OptionTrue, OptionFalse>where
OptionTrue: 'static + ?Sized,
OptionFalse: 'static + ?Sized,{
type Result: CTBool;
type Path: 'static + ?Sized;
}
Expand description
Generic version of an IF test encoded within the type system.
Condition is the type which must match.
OptionTrue will be passed into CTIf::Path
if the condition match is TRUE.
OptionFalse will be passed into CTIf::Path
if the condition match is FALSE.
Specialized versions of this trait are necessary when the receiving type parameter
is constrained. See ctif_specialize
to create such a specialized version.