pub enum SValueToBoolQ {
EmptyStringTreatedAsFalse,
NonEmptyStringTreatedAsTrue,
ZeroToFalse,
OneToTrue,
IntToBoolNotLossless(i64),
FloatToBoolNotLossless(f64),
}Expand description
Generated by SValue::q_as_bool
As Scratch blocks don’t allow placing an expression block inside of an comparison context (block shapes, round blocks can’t be placed in wholes of shape <..>) this shouldn’t occur for normal user programs.
Variants§
EmptyStringTreatedAsFalse
Boolean conversion for empty string returned false
NonEmptyStringTreatedAsTrue
Boolean conversion of a non-empty string returned true
ZeroToFalse
The integer or float number zero was converted to false
OneToTrue
The integer or float number one was converted to true
IntToBoolNotLossless(i64)
An integer that was neither zero nor one was converted to true
FloatToBoolNotLossless(f64)
A float that was neither zero nor one was converted to true
Auto Trait Implementations§
impl Freeze for SValueToBoolQ
impl RefUnwindSafe for SValueToBoolQ
impl Send for SValueToBoolQ
impl Sync for SValueToBoolQ
impl Unpin for SValueToBoolQ
impl UnsafeUnpin for SValueToBoolQ
impl UnwindSafe for SValueToBoolQ
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more