pub trait Booleable: Sized + Sync + Copy {
// Required methods
fn from_bool(b: bool) -> Self;
fn try_into_bool(self) -> Option<bool>;
// Provided method
fn into_bool(self) -> bool { ... }
}
Expand description
Converts to and from a bool
Required Methods§
sourcefn try_into_bool(self) -> Option<bool>
fn try_into_bool(self) -> Option<bool>
Try to convert into bool. Returns None if cannot be converted.
Provided Methods§
Object Safety§
This trait is not object safe.