Struct snarkvm_console_types_string::Field 
source · [−]pub struct Field<E> where
    E: Environment, { /* private fields */ }Implementations
sourceimpl<E> Field<E> where
    E: Environment, 
 
impl<E> Field<E> where
    E: Environment, 
sourcepub const SIZE_IN_BITS: usize = <E::Field>::SIZE_IN_BITS
 
pub const SIZE_IN_BITS: usize = <E::Field>::SIZE_IN_BITS
The field size in bits.
sourcepub const SIZE_IN_BYTES: usize = (<E::Field>::SIZE_IN_BITS + 7) / 8
 
pub const SIZE_IN_BYTES: usize = (<E::Field>::SIZE_IN_BITS + 7) / 8
The field size in bytes.
sourcepub const SIZE_IN_DATA_BITS: usize = <E::Field>::SIZE_IN_DATA_BITS
 
pub const SIZE_IN_DATA_BITS: usize = <E::Field>::SIZE_IN_DATA_BITS
The field capacity for data bits.
sourcepub const fn new(field: <E as Environment>::Field) -> Field<E>
 
pub const fn new(field: <E as Environment>::Field) -> Field<E>
Initializes a new field.
sourcepub fn new_domain_separator(domain: &str) -> Field<E>
 
pub fn new_domain_separator(domain: &str) -> Field<E>
Initializes a new field as a domain separator.
Trait Implementations
sourceimpl<E> Add<&Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Add<&Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> Add<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Add<Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> AddAssign<&Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> AddAssign<&Field<E>> for Field<E> where
    E: Environment, 
sourcefn add_assign(&mut self, other: &Field<E>)
 
fn add_assign(&mut self, other: &Field<E>)
Adds other to self.
sourceimpl<E> AddAssign<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> AddAssign<Field<E>> for Field<E> where
    E: Environment, 
sourcefn add_assign(&mut self, other: Field<E>)
 
fn add_assign(&mut self, other: Field<E>)
Adds other to self.
sourceimpl<E> Clone for Field<E> where
    E: Clone + Environment,
    <E as Environment>::Field: Clone, 
 
impl<E> Clone for Field<E> where
    E: Clone + Environment,
    <E as Environment>::Field: Clone, 
sourceimpl<E> Compare<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Compare<Field<E>> for Field<E> where
    E: Environment, 
sourcefn is_less_than(
    &self,
    other: &Field<E>
) -> <Field<E> as Compare<Field<E>>>::Output
 
fn is_less_than(
    &self,
    other: &Field<E>
) -> <Field<E> as Compare<Field<E>>>::Output
Returns true if self is less than other.
sourcefn is_greater_than(
    &self,
    other: &Field<E>
) -> <Field<E> as Compare<Field<E>>>::Output
 
fn is_greater_than(
    &self,
    other: &Field<E>
) -> <Field<E> as Compare<Field<E>>>::Output
Returns true if self is greater than other.
sourcefn is_less_than_or_equal(
    &self,
    other: &Field<E>
) -> <Field<E> as Compare<Field<E>>>::Output
 
fn is_less_than_or_equal(
    &self,
    other: &Field<E>
) -> <Field<E> as Compare<Field<E>>>::Output
Returns true if self is less than or equal to other.
sourcefn is_greater_than_or_equal(
    &self,
    other: &Field<E>
) -> <Field<E> as Compare<Field<E>>>::Output
 
fn is_greater_than_or_equal(
    &self,
    other: &Field<E>
) -> <Field<E> as Compare<Field<E>>>::Output
Returns true if self is greater than or equal to other.
type Output = Boolean<E>
sourceimpl<E> Debug for Field<E> where
    E: Environment, 
 
impl<E> Debug for Field<E> where
    E: Environment, 
sourceimpl<E> Deref for Field<E> where
    E: Environment, 
 
impl<E> Deref for Field<E> where
    E: Environment, 
sourceimpl<'de, E> Deserialize<'de> for Field<E> where
    E: Environment, 
 
impl<'de, E> Deserialize<'de> for Field<E> where
    E: Environment, 
sourcefn deserialize<D>(
    deserializer: D
) -> Result<Field<E>, <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 
 
fn deserialize<D>(
    deserializer: D
) -> Result<Field<E>, <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 
Deserializes the field from a string or bytes.
sourceimpl<E> Display for Field<E> where
    E: Environment, 
 
impl<E> Display for Field<E> where
    E: Environment, 
sourceimpl<E> Distribution<Field<E>> for Standard where
    E: Environment, 
 
impl<E> Distribution<Field<E>> for Standard where
    E: Environment, 
sourcefn sample<R>(&self, rng: &mut R) -> Field<E> where
    R: Rng + ?Sized, 
 
fn sample<R>(&self, rng: &mut R) -> Field<E> where
    R: Rng + ?Sized, 
Generate a random value of T, using rng as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
    R: Rng, 
 
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
    R: Rng, 
Create an iterator that generates random values of T, using rng as
the source of randomness. Read more
sourceimpl<E> Div<&Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Div<&Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> Div<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Div<Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> DivAssign<&Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> DivAssign<&Field<E>> for Field<E> where
    E: Environment, 
sourcefn div_assign(&mut self, other: &Field<E>)
 
fn div_assign(&mut self, other: &Field<E>)
Divides self by other.
sourceimpl<E> DivAssign<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> DivAssign<Field<E>> for Field<E> where
    E: Environment, 
sourcefn div_assign(&mut self, other: Field<E>)
 
fn div_assign(&mut self, other: Field<E>)
Divides self by other.
sourceimpl<E> Double for Field<E> where
    E: Environment, 
 
impl<E> Double for Field<E> where
    E: Environment, 
sourceimpl<E> Equal<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Equal<Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> FromBits for Field<E> where
    E: Environment, 
 
impl<E> FromBits for Field<E> where
    E: Environment, 
sourcefn from_bits_le(bits_le: &[bool]) -> Result<Field<E>, Error>
 
fn from_bits_le(bits_le: &[bool]) -> Result<Field<E>, Error>
Initializes a new field from a list of little-endian bits.
- If bits_leis longer thanE::Field::size_in_bits(), the excess bits are enforced to be0s.
- If bits_leis shorter thanE::Field::size_in_bits(), it is padded with0s up to field size.
sourceimpl<E> FromBytes for Field<E> where
    E: Environment, 
 
impl<E> FromBytes for Field<E> where
    E: Environment, 
sourceimpl<E> FromStr for Field<E> where
    E: Environment, 
 
impl<E> FromStr for Field<E> where
    E: Environment, 
sourceimpl<E> Hash for Field<E> where
    E: Hash + Environment,
    <E as Environment>::Field: Hash, 
 
impl<E> Hash for Field<E> where
    E: Hash + Environment,
    <E as Environment>::Field: Hash, 
sourceimpl<E> Inverse for Field<E> where
    E: Environment, 
 
impl<E> Inverse for Field<E> where
    E: Environment, 
sourceimpl<E> Mul<&Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Mul<&Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> Mul<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Mul<Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> MulAssign<&Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> MulAssign<&Field<E>> for Field<E> where
    E: Environment, 
sourcefn mul_assign(&mut self, other: &Field<E>)
 
fn mul_assign(&mut self, other: &Field<E>)
Multiplies self by other.
sourceimpl<E> MulAssign<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> MulAssign<Field<E>> for Field<E> where
    E: Environment, 
sourcefn mul_assign(&mut self, other: Field<E>)
 
fn mul_assign(&mut self, other: Field<E>)
Multiplies self by other.
sourceimpl<E> Neg for Field<E> where
    E: Environment, 
 
impl<E> Neg for Field<E> where
    E: Environment, 
sourceimpl<E> One for Field<E> where
    E: Environment, 
 
impl<E> One for Field<E> where
    E: Environment, 
sourceimpl<E> Ord for Field<E> where
    E: Environment, 
 
impl<E> Ord for Field<E> where
    E: Environment, 
sourcefn cmp(&self, other: &Field<E>) -> Ordering
 
fn cmp(&self, other: &Field<E>) -> Ordering
Returns the lexicographic ordering of self and other.
1.21.0 · sourcefn max(self, other: Self) -> Self
 
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
 
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
    Self: PartialOrd<Self>, 
 
fn clamp(self, min: Self, max: Self) -> Self where
    Self: PartialOrd<Self>, 
Restrict a value to a certain interval. Read more
sourceimpl<E> Parser for Field<E> where
    E: Environment, 
 
impl<E> Parser for Field<E> where
    E: Environment, 
sourceimpl<E> PartialEq<Field<E>> for Field<E> where
    E: PartialEq<E> + Environment,
    <E as Environment>::Field: PartialEq<<E as Environment>::Field>, 
 
impl<E> PartialEq<Field<E>> for Field<E> where
    E: PartialEq<E> + Environment,
    <E as Environment>::Field: PartialEq<<E as Environment>::Field>, 
sourceimpl<E> PartialOrd<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> PartialOrd<Field<E>> for Field<E> where
    E: Environment, 
sourcefn partial_cmp(&self, other: &Field<E>) -> Option<Ordering>
 
fn partial_cmp(&self, other: &Field<E>) -> Option<Ordering>
Returns the lexicographic ordering of self and other.
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
 
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl<E> Pow<&Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Pow<&Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> Pow<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Pow<Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<'a, E> Product<&'a Field<E>> for Field<E> where
    E: Environment, 
 
impl<'a, E> Product<&'a Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> Product<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Product<Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> Serialize for Field<E> where
    E: Environment, 
 
impl<E> Serialize for Field<E> where
    E: Environment, 
sourcefn 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 field into a string or as bytes.
sourceimpl<E> SizeInBits for Field<E> where
    E: Environment, 
 
impl<E> SizeInBits for Field<E> where
    E: Environment, 
sourcefn size_in_bits() -> usize
 
fn size_in_bits() -> usize
Returns the field size in bits.
sourceimpl<E> SizeInBytes for Field<E> where
    E: Environment, 
 
impl<E> SizeInBytes for Field<E> where
    E: Environment, 
sourcefn size_in_bytes() -> usize
 
fn size_in_bytes() -> usize
Returns the field size in bytes.
sourceimpl<E> SizeInDataBits for Field<E> where
    E: Environment, 
 
impl<E> SizeInDataBits for Field<E> where
    E: Environment, 
sourcefn size_in_data_bits() -> usize
 
fn size_in_data_bits() -> usize
Returns the field capacity for data bits.
sourceimpl<E> Square for Field<E> where
    E: Environment, 
 
impl<E> Square for Field<E> where
    E: Environment, 
sourceimpl<E> SquareRoot for Field<E> where
    E: Environment, 
 
impl<E> SquareRoot for Field<E> where
    E: Environment, 
sourcefn square_root(&self) -> Result<<Field<E> as SquareRoot>::Output, Error>
 
fn square_root(&self) -> Result<<Field<E> as SquareRoot>::Output, Error>
Returns the square_root of self.
type Output = Field<E>
sourceimpl<E> Sub<&Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Sub<&Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> Sub<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Sub<Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> SubAssign<&Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> SubAssign<&Field<E>> for Field<E> where
    E: Environment, 
sourcefn sub_assign(&mut self, other: &Field<E>)
 
fn sub_assign(&mut self, other: &Field<E>)
Subtracts other from self.
sourceimpl<E> SubAssign<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> SubAssign<Field<E>> for Field<E> where
    E: Environment, 
sourcefn sub_assign(&mut self, other: Field<E>)
 
fn sub_assign(&mut self, other: Field<E>)
Subtracts other from self.
sourceimpl<'a, E> Sum<&'a Field<E>> for Field<E> where
    E: Environment, 
 
impl<'a, E> Sum<&'a Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> Sum<Field<E>> for Field<E> where
    E: Environment, 
 
impl<E> Sum<Field<E>> for Field<E> where
    E: Environment, 
sourceimpl<E> Ternary for Field<E> where
    E: Environment, 
 
impl<E> Ternary for Field<E> where
    E: Environment, 
sourceimpl<E> ToBits for Field<E> where
    E: Environment, 
 
impl<E> ToBits for Field<E> where
    E: Environment, 
sourceimpl<E> ToBytes for Field<E> where
    E: Environment, 
 
impl<E> ToBytes for Field<E> where
    E: Environment, 
sourceimpl<E> TypeName for Field<E> where
    E: Environment, 
 
impl<E> TypeName for Field<E> where
    E: Environment, 
sourceimpl<E> Zero for Field<E> where
    E: Environment, 
 
impl<E> Zero for Field<E> where
    E: Environment, 
impl<E> Copy for Field<E> where
    E: Copy + Environment,
    <E as Environment>::Field: Copy, 
impl<E> Eq for Field<E> where
    E: Eq + Environment,
    <E as Environment>::Field: Eq, 
impl<E> FieldTrait for Field<E> where
    E: Environment, 
impl<E> StructuralEq for Field<E> where
    E: Environment, 
impl<E> StructuralPartialEq for Field<E> where
    E: Environment, 
Auto Trait Implementations
impl<E> RefUnwindSafe for Field<E> where
    <E as Environment>::Field: RefUnwindSafe, 
impl<E> Send for Field<E>
impl<E> Sync for Field<E>
impl<E> Unpin for Field<E> where
    <E as Environment>::Field: Unpin, 
impl<E> UnwindSafe for Field<E> where
    <E as Environment>::Field: UnwindSafe, 
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more