Struct snarkvm_console_types_boolean::Boolean
source · pub struct Boolean<E: Environment> { /* private fields */ }
Implementations§
Trait Implementations§
source§impl<E: Environment> BitAndAssign<Boolean<E>> for Boolean<E>
impl<E: Environment> BitAndAssign<Boolean<E>> for Boolean<E>
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Sets self
as the bitwise AND
of self
and other
.
source§impl<E: Environment> BitOrAssign<Boolean<E>> for Boolean<E>
impl<E: Environment> BitOrAssign<Boolean<E>> for Boolean<E>
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Sets self
as the bitwise OR
of self
and other
.
source§impl<E: Environment> BitXorAssign<Boolean<E>> for Boolean<E>
impl<E: Environment> BitXorAssign<Boolean<E>> for Boolean<E>
source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Sets self
as the bitwise XOR
of self
and other
.
source§impl<E: Environment> Debug for Boolean<E>
impl<E: Environment> Debug for Boolean<E>
source§impl<E: Environment> Deref for Boolean<E>
impl<E: Environment> Deref for Boolean<E>
source§impl<'de, E: Environment> Deserialize<'de> for Boolean<E>
impl<'de, E: Environment> Deserialize<'de> for Boolean<E>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes the boolean from a string or bytes.
source§impl<E: Environment> Display for Boolean<E>
impl<E: Environment> Display for Boolean<E>
source§impl<E: Environment> Distribution<Boolean<E>> for Standard
impl<E: Environment> Distribution<Boolean<E>> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Boolean<E>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Boolean<E>
Generate a random value of
T
, using rng
as the source of randomness.source§impl<E: Environment> FromBits for Boolean<E>
impl<E: Environment> FromBits for Boolean<E>
source§fn from_bits_le(bits_le: &[bool]) -> Result<Self>
fn from_bits_le(bits_le: &[bool]) -> Result<Self>
Initializes a new boolean by extracting the first bit from a list of length 1.
source§fn from_bits_be(bits_be: &[bool]) -> Result<Self>
fn from_bits_be(bits_be: &[bool]) -> Result<Self>
Initializes a new boolean by extracting the first bit from a list of length 1.
source§impl<E: Environment> FromBytes for Boolean<E>
impl<E: Environment> FromBytes for Boolean<E>
source§impl<E: Environment> FromStr for Boolean<E>
impl<E: Environment> FromStr for Boolean<E>
source§impl<E: Environment> Not for Boolean<E>
impl<E: Environment> Not for Boolean<E>
source§impl<E: Environment> Parser for Boolean<E>
impl<E: Environment> Parser for Boolean<E>
source§fn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into a boolean.
source§impl<E: PartialEq + Environment> PartialEq<Boolean<E>> for Boolean<E>
impl<E: PartialEq + Environment> PartialEq<Boolean<E>> for Boolean<E>
source§impl<E: Environment> Serialize for Boolean<E>
impl<E: Environment> Serialize for Boolean<E>
source§impl<E: Environment> SizeInBits for Boolean<E>
impl<E: Environment> SizeInBits for Boolean<E>
source§fn size_in_bits() -> usize
fn size_in_bits() -> usize
Returns the field size in bits.
source§impl<E: Environment> SizeInBytes for Boolean<E>
impl<E: Environment> SizeInBytes for Boolean<E>
source§fn size_in_bytes() -> usize
fn size_in_bytes() -> usize
Returns the boolean size in bytes.
source§impl<E: Environment> SizeInDataBits for Boolean<E>
impl<E: Environment> SizeInDataBits for Boolean<E>
source§fn size_in_data_bits() -> usize
fn size_in_data_bits() -> usize
Returns the field capacity for data bits.
source§impl<E: Environment> Ternary for Boolean<E>
impl<E: Environment> Ternary for Boolean<E>
source§impl<E: Environment> ToBits for Boolean<E>
impl<E: Environment> ToBits for Boolean<E>
source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Outputs self
in a vector.
source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Outputs self
in a vector.
source§impl<E: Environment> ToBytes for Boolean<E>
impl<E: Environment> ToBytes for Boolean<E>
source§impl<E: Environment> TypeName for Boolean<E>
impl<E: Environment> TypeName for Boolean<E>
impl<E: Environment> BooleanTrait for Boolean<E>
impl<E: Copy + Environment> Copy for Boolean<E>
impl<E: Eq + Environment> Eq for Boolean<E>
impl<E: Environment> StructuralEq for Boolean<E>
impl<E: Environment> StructuralPartialEq for Boolean<E>
Auto Trait Implementations§
impl<E> RefUnwindSafe for Boolean<E>where E: RefUnwindSafe,
impl<E> Send for Boolean<E>
impl<E> Sync for Boolean<E>
impl<E> Unpin for Boolean<E>where E: Unpin,
impl<E> UnwindSafe for Boolean<E>where E: UnwindSafe,
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
§impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere T: DeserializeOwned,
fn take_from_value<D>( value: &mut Value, field: &str ) -> Result<T, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.