pub struct Bool(/* private fields */);
Expand description
A Number
that can be used as a boolean.
Implementations§
Trait Implementations§
source§impl AddAssign for Bool
impl AddAssign for Bool
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl DivAssign for Bool
impl DivAssign for Bool
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moresource§impl MulAssign for Bool
impl MulAssign for Bool
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl Number for Bool
impl Number for Bool
source§fn mul_add_assign(&mut self, a: Self, b: Self)
fn mul_add_assign(&mut self, a: Self, b: Self)
Replaces
self
with self + a * b
.source§fn from_le_bytes(bytes: &[u8]) -> Self
fn from_le_bytes(bytes: &[u8]) -> Self
Reads a
Number
from little endian bytes.source§fn to_le_bytes(self) -> Vec<u8>
fn to_le_bytes(self) -> Vec<u8>
Converts a
Number
to little endian bytes.source§fn from_be_bytes(bytes: &[u8]) -> Self
fn from_be_bytes(bytes: &[u8]) -> Self
Reads a
Number
from big endian bytes.source§fn to_be_bytes(self) -> Vec<u8>
fn to_be_bytes(self) -> Vec<u8>
Converts a
Number
to big endian bytes.source§fn next_random<R: Rng>(rng: &mut R) -> Self
fn next_random<R: Rng>(rng: &mut R) -> Self
Returns a random
Number
.source§impl Ord for Bool
impl Ord for Bool
source§impl PartialEq for Bool
impl PartialEq for Bool
source§impl PartialOrd for Bool
impl PartialOrd for Bool
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl RemAssign for Bool
impl RemAssign for Bool
source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%=
operation. Read moresource§impl SubAssign for Bool
impl SubAssign for Bool
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for Bool
impl Eq for Bool
impl StructuralPartialEq for Bool
Auto Trait Implementations§
impl Freeze for Bool
impl RefUnwindSafe for Bool
impl Send for Bool
impl Sync for Bool
impl Unpin for Bool
impl UnwindSafe for Bool
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