pub struct Address<E>(/* private fields */)
where
E: Environment;
Implementations§
Trait Implementations§
Source§impl<E, I> Cast<Address<E>> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> Cast<Address<E>> for Integer<E, I>where
E: Environment,
I: IntegerType,
Source§fn cast(&self) -> Address<E>
fn cast(&self) -> Address<E>
Casts an Integer
to an Address
.
This operation converts the integer to a field element, and then attempts to recover the group element by treating the field element as an x-coordinate. The group element is then converted to an address.
To cast arbitrary integers to addresses, use Integer::cast_lossy
.
Source§impl<E> Cast<Address<E>> for Scalar<E>where
E: Environment,
impl<E> Cast<Address<E>> for Scalar<E>where
E: Environment,
Source§fn cast(&self) -> Address<E>
fn cast(&self) -> Address<E>
Casts a Scalar
to an Address
.
This operation converts the scalar to a field element, and then attempts to recover the group element by treating the field element as an x-coordinate. The group element is then converted to an address.
To cast arbitrary scalars to addresses, use Scalar::cast_lossy
.
Source§impl<E> CastLossy<Address<E>> for Boolean<E>where
E: Environment,
impl<E> CastLossy<Address<E>> for Boolean<E>where
E: Environment,
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> CastLossy<Address<E>> for Field<E>where
E: Environment,
impl<E> CastLossy<Address<E>> for Field<E>where
E: Environment,
Source§fn cast_lossy(&self) -> Address<E>
fn cast_lossy(&self) -> Address<E>
Casts a Field
to an Address
.
This operation attempts to recover the group element from the given field,
which is then used to construct the address. See the documentation of Field::cast_lossy
on the Group
type for more details.
Source§impl<E, I> CastLossy<Address<E>> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> CastLossy<Address<E>> for Integer<E, I>where
E: Environment,
I: IntegerType,
Source§fn cast_lossy(&self) -> Address<E>
fn cast_lossy(&self) -> Address<E>
Casts an Integer
to an Address
.
This operation converts the integer into a field element, and then attempts to recover
the group element to construct the address. See the documentation of Field::cast_lossy
on the Group
type for more details.
Source§impl<E> CastLossy<Address<E>> for Scalar<E>where
E: Environment,
impl<E> CastLossy<Address<E>> for Scalar<E>where
E: Environment,
Source§fn cast_lossy(&self) -> Address<E>
fn cast_lossy(&self) -> Address<E>
Casts a Scalar
to an Address
.
This operation converts the scalar into a field element, and then attempts to recover
the group element to construct the address. See the documentation of Field::cast_lossy
on the Group
type for more details.
Source§impl<E> Compare for Address<E>where
E: Environment,
impl<E> Compare for Address<E>where
E: Environment,
Source§fn is_less_than(&self, other: &Address<E>) -> <Address<E> as Compare>::Output
fn is_less_than(&self, other: &Address<E>) -> <Address<E> as Compare>::Output
Returns true
if self
is less than other
.
Source§fn is_greater_than(&self, other: &Address<E>) -> <Address<E> as Compare>::Output
fn is_greater_than(&self, other: &Address<E>) -> <Address<E> as Compare>::Output
Returns true
if self
is greater than other
.
Source§fn is_less_than_or_equal(
&self,
other: &Address<E>,
) -> <Address<E> as Compare>::Output
fn is_less_than_or_equal( &self, other: &Address<E>, ) -> <Address<E> as Compare>::Output
Returns true
if self
is less than or equal to other
.
Source§fn is_greater_than_or_equal(
&self,
other: &Address<E>,
) -> <Address<E> as Compare>::Output
fn is_greater_than_or_equal( &self, other: &Address<E>, ) -> <Address<E> as Compare>::Output
Returns true
if self
is greater than or equal to other
.
type Output = Boolean<E>
Source§impl<E> Debug for Address<E>where
E: Environment,
impl<E> Debug for Address<E>where
E: Environment,
Source§impl<E> Display for Address<E>where
E: Environment,
impl<E> Display for Address<E>where
E: Environment,
Source§impl<E> Eject for Address<E>where
E: Environment,
impl<E> Eject for Address<E>where
E: Environment,
Source§fn eject_mode(&self) -> Mode
fn eject_mode(&self) -> Mode
Ejects the mode of the address.
type Primitive = Address<<E as Environment>::Network>
Source§fn eject(&self) -> (Mode, Self::Primitive)
fn eject(&self) -> (Mode, Self::Primitive)
Source§fn is_constant(&self) -> bool
fn is_constant(&self) -> bool
true
if the circuit is a constant.Source§fn is_private(&self) -> bool
fn is_private(&self) -> bool
true
if the circuit is a private.Source§impl<E> Equal for Address<E>where
E: Environment,
impl<E> Equal for Address<E>where
E: Environment,
Source§impl<E> From<&Address<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<&Address<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(
address: &Address<E>,
) -> LinearCombination<<E as Environment>::BaseField>
fn from( address: &Address<E>, ) -> LinearCombination<<E as Environment>::BaseField>
Source§impl<E> From<Address<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<Address<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(address: Address<E>) -> LinearCombination<<E as Environment>::BaseField>
fn from(address: Address<E>) -> LinearCombination<<E as Environment>::BaseField>
Source§impl<E> FromBits for Address<E>where
E: Environment,
impl<E> FromBits for Address<E>where
E: Environment,
Source§fn from_bits_le(bits_le: &[<Address<E> as FromBits>::Boolean]) -> Address<E>
fn from_bits_le(bits_le: &[<Address<E> as FromBits>::Boolean]) -> Address<E>
Initializes an address from a list of little-endian bits without trailing zeros.
Source§fn from_bits_be(bits_be: &[<Address<E> as FromBits>::Boolean]) -> Address<E>
fn from_bits_be(bits_be: &[<Address<E> as FromBits>::Boolean]) -> Address<E>
Initializes an address from a list of big-endian bits without leading zeros.
type Boolean = Boolean<E>
Source§impl<E> FromField for Address<E>where
E: Environment,
impl<E> FromField for Address<E>where
E: Environment,
Source§impl<E> FromGroup for Address<E>where
E: Environment,
impl<E> FromGroup for Address<E>where
E: Environment,
Source§impl<E> FromStr for Address<E>where
E: Environment,
impl<E> FromStr for Address<E>where
E: Environment,
Source§impl<E> Inject for Address<E>where
E: Environment,
impl<E> Inject for Address<E>where
E: Environment,
Source§impl<E> Metrics<dyn Ternary<Output = Address<E>, Boolean = Boolean<E>>> for Address<E>where
E: Environment,
impl<E> Metrics<dyn Ternary<Output = Address<E>, Boolean = Boolean<E>>> for Address<E>where
E: Environment,
Source§impl<E> OutputMode<dyn Ternary<Output = Address<E>, Boolean = Boolean<E>>> for Address<E>where
E: Environment,
impl<E> OutputMode<dyn Ternary<Output = Address<E>, Boolean = Boolean<E>>> for Address<E>where
E: Environment,
Source§impl<E> Parser for Address<E>where
E: Environment,
impl<E> Parser for Address<E>where
E: Environment,
Source§impl<E> Ternary for Address<E>where
E: Environment,
impl<E> Ternary for Address<E>where
E: Environment,
Source§impl<E> ToBits for &Address<E>where
E: Environment,
impl<E> ToBits for &Address<E>where
E: Environment,
Source§fn write_bits_le(&self, vec: &mut Vec<<&Address<E> as ToBits>::Boolean>)
fn write_bits_le(&self, vec: &mut Vec<<&Address<E> as ToBits>::Boolean>)
Outputs the little-endian bit representation of self.x
without trailing zeros.
Source§fn write_bits_be(&self, vec: &mut Vec<<&Address<E> as ToBits>::Boolean>)
fn write_bits_be(&self, vec: &mut Vec<<&Address<E> as ToBits>::Boolean>)
Outputs the big-endian bit representation of self.x
without leading zeros.
type Boolean = Boolean<E>
Source§fn to_bits_le(&self) -> Vec<Self::Boolean>
fn to_bits_le(&self) -> Vec<Self::Boolean>
Source§fn to_bits_be(&self) -> Vec<Self::Boolean>
fn to_bits_be(&self) -> Vec<Self::Boolean>
Source§impl<E> ToBits for Address<E>where
E: Environment,
impl<E> ToBits for Address<E>where
E: Environment,
Source§fn write_bits_le(&self, vec: &mut Vec<<Address<E> as ToBits>::Boolean>)
fn write_bits_le(&self, vec: &mut Vec<<Address<E> as ToBits>::Boolean>)
Outputs the little-endian bit representation of self.x
without trailing zeros.
Source§fn write_bits_be(&self, vec: &mut Vec<<Address<E> as ToBits>::Boolean>)
fn write_bits_be(&self, vec: &mut Vec<<Address<E> as ToBits>::Boolean>)
Outputs the big-endian bit representation of self.x
without leading zeros.
type Boolean = Boolean<E>
Source§fn to_bits_le(&self) -> Vec<Self::Boolean>
fn to_bits_le(&self) -> Vec<Self::Boolean>
Source§fn to_bits_be(&self) -> Vec<Self::Boolean>
fn to_bits_be(&self) -> Vec<Self::Boolean>
Source§impl<E> ToField for Address<E>where
E: Environment,
impl<E> ToField for Address<E>where
E: Environment,
Source§impl<E> ToGroup for Address<E>where
E: Environment,
impl<E> ToGroup for Address<E>where
E: Environment,
Source§impl<E> TypeName for Address<E>where
E: Environment,
impl<E> TypeName for Address<E>where
E: Environment,
impl<E> AddressTrait for Address<E>where
E: Environment,
Auto Trait Implementations§
impl<E> !Freeze for Address<E>
impl<E> !RefUnwindSafe for Address<E>
impl<E> Send for Address<E>
impl<E> !Sync for Address<E>
impl<E> Unpin for Address<E>
impl<E> UnwindSafe for Address<E>
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<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