pub(crate) trait ToLlvmBool: Copy {
// Required method
fn to_llvm_bool(self) -> Bool;
}
Expand description
Convenience trait to convert bool
to llvm::Bool
with an explicit method call.
Being able to write b.to_llvm_bool()
is less noisy than llvm::Bool::from(b)
,
while being more explicit and less mistake-prone than something like b.into()
.
Required Methods§
fn to_llvm_bool(self) -> Bool
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.