pub trait ConstBool: Default + Copy {
type Conditional<T, F>;
type ConditionalBool<T: ConstBool, F: ConstBool>: ConstBool;
type ConditionalInt<T: ConstInteger, F: ConstInteger>: ConstInteger;
type And<Other: ConstBool>: ConstBool;
const VALUE: bool;
// Required method
fn conditional_exec<TrueFn, FalseFn>(
t: TrueFn,
f: FalseFn,
) -> Self::Conditional<TrueFn::Output, FalseFn::Output>
where TrueFn: NullaryFunction,
FalseFn: NullaryFunction;
// Provided method
fn value(self) -> bool { ... }
}
Required Associated Constants§
Required Associated Types§
Sourcetype Conditional<T, F>
type Conditional<T, F>
T if true, F otherwise.
Sourcetype ConditionalBool<T: ConstBool, F: ConstBool>: ConstBool
type ConditionalBool<T: ConstBool, F: ConstBool>: ConstBool
Same as Self::Conditional but with ConstBool bounds.
Sourcetype ConditionalInt<T: ConstInteger, F: ConstInteger>: ConstInteger
type ConditionalInt<T: ConstInteger, F: ConstInteger>: ConstInteger
Same as Self::Conditional but with ConstInteger bounds.
type And<Other: ConstBool>: ConstBool
Required Methods§
fn conditional_exec<TrueFn, FalseFn>(
t: TrueFn,
f: FalseFn,
) -> Self::Conditional<TrueFn::Output, FalseFn::Output>where
TrueFn: NullaryFunction,
FalseFn: NullaryFunction,
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.