Struct snarkvm_wasm::traits::utilities::uint::UInt8[][src]

pub struct UInt8 {
    pub bits: Vec<Boolean, Global>,
    pub negated: bool,
    pub value: Option<u8>,
}

Fields

bits: Vec<Boolean, Global>negated: boolvalue: Option<u8>

Implementations

impl UInt8[src]

pub fn constant_vec(values: &[u8]) -> Vec<UInt8, Global>[src]

Construct a constant vector of UInt8 from a vector of u8

pub fn alloc_vec<F, CS, T>(
    cs: CS,
    values: &[T]
) -> Result<Vec<UInt8, Global>, SynthesisError> where
    CS: ConstraintSystem<F>,
    T: Into<Option<u8>> + Copy,
    F: Field
[src]

pub fn alloc_input_vec_le<F, CS>(
    cs: CS,
    values: &[u8]
) -> Result<Vec<UInt8, Global>, SynthesisError> where
    CS: ConstraintSystem<F>,
    F: PrimeField
[src]

Allocates a vector of u8’s by first converting (chunks of) them to F elements, (thus reducing the number of input allocations), and then converts this list of F gadgets back into bytes.

impl UInt8[src]

pub fn constant(value: u8) -> UInt8[src]

Trait Implementations

impl<F> Add<F, UInt8> for UInt8 where
    F: Field + PrimeField
[src]

type ErrorType = SynthesisError

impl<F> AllocGadget<u8, F> for UInt8 where
    F: Field
[src]

impl Clone for UInt8[src]

impl<F> ComparatorGadget<F> for UInt8 where
    F: Field + PrimeField
[src]

impl<F> CondSelectGadget<F> for UInt8 where
    F: PrimeField
[src]

impl<F> ConditionalEqGadget<F> for UInt8 where
    F: Field
[src]

impl Debug for UInt8[src]

impl Eq for UInt8[src]

impl<F> EqGadget<F> for UInt8 where
    F: Field
[src]

impl<F> EvaluateEqGadget<F> for UInt8 where
    F: PrimeField
[src]

impl<F> EvaluateLtGadget<F> for UInt8 where
    F: Field + PrimeField
[src]

impl PartialEq<UInt8> for UInt8[src]

impl PartialOrd<UInt8> for UInt8[src]

impl<F> ToBytesGadget<F> for UInt8 where
    F: Field
[src]

impl UInt for UInt8[src]

pub fn sub_unsafe<F, CS>(
    &self,
    cs: CS,
    other: &UInt8
) -> Result<UInt8, SynthesisError> where
    CS: ConstraintSystem<F>,
    F: PrimeField
[src]

Used for division. Evaluates a - b, and when a - b < 0, returns 0.

Auto Trait Implementations

impl RefUnwindSafe for UInt8

impl Send for UInt8

impl Sync for UInt8

impl Unpin for UInt8

impl UnwindSafe for UInt8

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<F, T> ConditionalOrEqualsGadget<F> for T where
    T: ConditionalEqGadget<F> + CondSelectGadget<F>,
    F: Field
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F, T> OrEqualsGadget<F> for T where
    T: ConditionalOrEqualsGadget<F>,
    F: Field
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,