pub struct Boolean<E>where
E: Environment,{ /* private fields */ }
Implementations§
Trait Implementations§
Source§impl<E> BitAnd for Boolean<E>where
E: Environment,
impl<E> BitAnd for Boolean<E>where
E: Environment,
Source§impl<E> BitAndAssign for Boolean<E>where
E: Environment,
impl<E> BitAndAssign for Boolean<E>where
E: Environment,
Source§fn bitand_assign(&mut self, other: Boolean<E>)
fn bitand_assign(&mut self, other: Boolean<E>)
Sets self
as the bitwise AND
of self
and other
.
Source§impl<E> BitOr for Boolean<E>where
E: Environment,
impl<E> BitOr for Boolean<E>where
E: Environment,
Source§impl<E> BitOrAssign for Boolean<E>where
E: Environment,
impl<E> BitOrAssign for Boolean<E>where
E: Environment,
Source§fn bitor_assign(&mut self, other: Boolean<E>)
fn bitor_assign(&mut self, other: Boolean<E>)
Sets self
as the bitwise OR
of self
and other
.
Source§impl<E> BitXor for Boolean<E>where
E: Environment,
impl<E> BitXor for Boolean<E>where
E: Environment,
Source§impl<E> BitXorAssign for Boolean<E>where
E: Environment,
impl<E> BitXorAssign for Boolean<E>where
E: Environment,
Source§fn bitxor_assign(&mut self, other: Boolean<E>)
fn bitxor_assign(&mut self, other: Boolean<E>)
Sets self
as the bitwise XOR
of self
and other
.
Source§impl<E: Environment, I: IntegerType> Cast<Boolean<E>> for Integer<E, I>
impl<E: Environment, I: IntegerType> Cast<Boolean<E>> for Integer<E, I>
Source§impl<E: Environment, I: IntegerType> Cast<Integer<E, I>> for Boolean<E>
impl<E: Environment, I: IntegerType> Cast<Integer<E, I>> for Boolean<E>
Source§impl<E: Environment> Cast for Boolean<E>
impl<E: Environment> Cast for Boolean<E>
Source§impl<E: Environment> CastLossy<Address<E>> for Boolean<E>
impl<E: Environment> CastLossy<Address<E>> for Boolean<E>
Source§fn cast_lossy(&self) -> Address<E>
fn cast_lossy(&self) -> Address<E>
Casts a Boolean
to an Address
.
This is safe because casting from a boolean to any other type is always lossless.
If the boolean is true, the address is the generator of the prime-order subgroup. If the boolean is false, the address is the zero group element.
Source§impl<E: Environment> CastLossy<Boolean<E>> for Field<E>
impl<E: Environment> CastLossy<Boolean<E>> for Field<E>
Source§fn cast_lossy(&self) -> Boolean<E>
fn cast_lossy(&self) -> Boolean<E>
Casts a Field
to a Boolean
, with lossy truncation.
This operation returns the least significant bit of the field.
Source§impl<E: Environment, I: IntegerType> CastLossy<Boolean<E>> for Integer<E, I>
impl<E: Environment, I: IntegerType> CastLossy<Boolean<E>> for Integer<E, I>
Source§fn cast_lossy(&self) -> Boolean<E>
fn cast_lossy(&self) -> Boolean<E>
Casts an Integer
to a Boolean
, with lossy truncation.
This operation returns the least significant bit of the field.
Source§impl<E: Environment> CastLossy<Boolean<E>> for Scalar<E>
impl<E: Environment> CastLossy<Boolean<E>> for Scalar<E>
Source§fn cast_lossy(&self) -> Boolean<E>
fn cast_lossy(&self) -> Boolean<E>
Casts a Scalar
to a Boolean
, with lossy truncation.
This operation returns the least significant bit of the field.
Source§impl<E: Environment> CastLossy<Field<E>> for Boolean<E>
impl<E: Environment> CastLossy<Field<E>> for Boolean<E>
Source§fn cast_lossy(&self) -> Field<E>
fn cast_lossy(&self) -> Field<E>
Casts a Boolean
to a Field
.
This is safe because casting from a boolean to any other type is always lossless.
Source§impl<E: Environment> CastLossy<Group<E>> for Boolean<E>
impl<E: Environment> CastLossy<Group<E>> for Boolean<E>
Source§fn cast_lossy(&self) -> Group<E>
fn cast_lossy(&self) -> Group<E>
Casts a Boolean
to a Group
.
This is safe because casting from a boolean to any other type is always lossless.
If the boolean is true, the group element is the generator of the prime-order subgroup. If the boolean is false, the group element is the zero group element.
Source§impl<E: Environment, I: IntegerType> CastLossy<Integer<E, I>> for Boolean<E>
impl<E: Environment, I: IntegerType> CastLossy<Integer<E, I>> for Boolean<E>
Source§fn cast_lossy(&self) -> Integer<E, I>
fn cast_lossy(&self) -> Integer<E, I>
Casts a Boolean
to an Integer
.
Source§impl<E: Environment> CastLossy<Scalar<E>> for Boolean<E>
impl<E: Environment> CastLossy<Scalar<E>> for Boolean<E>
Source§fn cast_lossy(&self) -> Scalar<E>
fn cast_lossy(&self) -> Scalar<E>
Casts a Boolean
to a Scalar
.
This is safe because casting from a boolean to any other type is always lossless.
Source§impl<E: Environment> CastLossy for Boolean<E>
impl<E: Environment> CastLossy for Boolean<E>
Source§fn cast_lossy(&self) -> Boolean<E>
fn cast_lossy(&self) -> Boolean<E>
Casts a Boolean
to a Boolean
.
This is an identity cast, so it is always lossless.
Source§impl<E> Debug for Boolean<E>where
E: Environment,
impl<E> Debug for Boolean<E>where
E: Environment,
Source§impl<E> Deref for Boolean<E>where
E: Environment,
impl<E> Deref for Boolean<E>where
E: Environment,
Source§impl<'de, E> Deserialize<'de> for Boolean<E>where
E: Environment,
impl<'de, E> Deserialize<'de> for Boolean<E>where
E: Environment,
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Boolean<E>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Boolean<E>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserializes the boolean from a string or bytes.
Source§impl<E> Display for Boolean<E>where
E: Environment,
impl<E> Display for Boolean<E>where
E: Environment,
Source§impl<E> Distribution<Boolean<E>> for Standardwhere
E: Environment,
impl<E> Distribution<Boolean<E>> for Standardwhere
E: Environment,
Source§impl<E> Equal for Boolean<E>where
E: Environment,
impl<E> Equal for Boolean<E>where
E: Environment,
Source§impl<E> FromBits for Boolean<E>where
E: Environment,
impl<E> FromBits for Boolean<E>where
E: Environment,
Source§impl<E> FromBytes for Boolean<E>where
E: Environment,
impl<E> FromBytes for Boolean<E>where
E: Environment,
Source§impl<E> FromStr for Boolean<E>where
E: Environment,
impl<E> FromStr for Boolean<E>where
E: Environment,
Source§impl<E> Nand for Boolean<E>where
E: Environment,
impl<E> Nand for Boolean<E>where
E: Environment,
Source§impl<E> Nor for Boolean<E>where
E: Environment,
impl<E> Nor for Boolean<E>where
E: Environment,
Source§impl<E> Not for Boolean<E>where
E: Environment,
impl<E> Not for Boolean<E>where
E: Environment,
Source§impl<E> Parser for Boolean<E>where
E: Environment,
impl<E> Parser for Boolean<E>where
E: Environment,
Source§impl<E> Serialize for Boolean<E>where
E: Environment,
impl<E> Serialize for Boolean<E>where
E: Environment,
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serializes the boolean into a string or as bytes.
Source§impl<E> SizeInBits for Boolean<E>where
E: Environment,
impl<E> SizeInBits for Boolean<E>where
E: Environment,
Source§fn size_in_bits() -> usize
fn size_in_bits() -> usize
Returns the field size in bits.
Source§impl<E> SizeInBytes for Boolean<E>where
E: Environment,
impl<E> SizeInBytes for Boolean<E>where
E: Environment,
Source§fn size_in_bytes() -> usize
fn size_in_bytes() -> usize
Returns the boolean size in bytes.
Source§impl<E> SizeInDataBits for Boolean<E>where
E: Environment,
impl<E> SizeInDataBits for Boolean<E>where
E: Environment,
Source§fn size_in_data_bits() -> usize
fn size_in_data_bits() -> usize
Returns the field capacity for data bits.
Source§impl<E> Ternary for Boolean<E>where
E: Environment,
impl<E> Ternary for Boolean<E>where
E: Environment,
Source§impl<E> ToBits for Boolean<E>where
E: Environment,
impl<E> ToBits for Boolean<E>where
E: Environment,
Source§fn write_bits_le(&self, vec: &mut Vec<bool>)
fn write_bits_le(&self, vec: &mut Vec<bool>)
Outputs self
in a vector.
Source§fn write_bits_be(&self, vec: &mut Vec<bool>)
fn write_bits_be(&self, vec: &mut Vec<bool>)
Outputs self
in a vector.
Source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
self
as a boolean array in little-endian order.Source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
self
as a boolean array in big-endian order.Source§impl<E> ToBytes for Boolean<E>where
E: Environment,
impl<E> ToBytes for Boolean<E>where
E: Environment,
Source§impl<E> TypeName for Boolean<E>where
E: Environment,
impl<E> TypeName for Boolean<E>where
E: Environment,
impl<E> BooleanTrait for Boolean<E>where
E: Environment,
impl<E> Copy for Boolean<E>where
E: Copy + Environment,
impl<E> Eq for Boolean<E>where
E: Eq + Environment,
impl<E> StructuralPartialEq for Boolean<E>where
E: Environment,
Auto Trait Implementations§
impl<E> Freeze for Boolean<E>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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