pub struct Byte<E: Engine> {
pub inner: Num<E>,
}
Fields§
§inner: Num<E>
Implementations§
Source§impl<E: Engine> Byte<E>
impl<E: Engine> Byte<E>
pub fn empty() -> Self
pub fn zero() -> Self
pub fn into_num(&self) -> Num<E>
pub fn get_value(&self) -> Option<E::Fr>
pub fn get_byte_value(&self) -> Option<u8>
pub fn from_u8_witness<CS: ConstraintSystem<E>>( cs: &mut CS, value: Option<u8>, ) -> Result<Self, SynthesisError>
pub fn from_u8_witness_multiple<CS: ConstraintSystem<E>, const N: usize>( cs: &mut CS, value: Option<[u8; N]>, ) -> Result<[Self; N], SynthesisError>
pub fn from_num<CS: ConstraintSystem<E>>( cs: &mut CS, value: Num<E>, ) -> Result<Self, SynthesisError>
pub fn from_num_unconstrained<CS: ConstraintSystem<E>>( _cs: &mut CS, value: Num<E>, ) -> Self
pub fn constant(value: u8) -> Self
pub fn from_cnst(value: E::Fr) -> Self
pub fn conditionally_select<CS: ConstraintSystem<E>>( cs: &mut CS, flag: &Boolean, a: &Self, b: &Self, ) -> Result<Self, SynthesisError>
pub fn is_zero<CS: ConstraintSystem<E>>( &self, cs: &mut CS, ) -> Result<Boolean, SynthesisError>
pub fn get_value_multiple<const N: usize>(els: &[Self; N]) -> Option<[E::Fr; N]>
pub fn get_byte_value_multiple<const N: usize>( els: &[Self; N], ) -> Option<[u8; N]>
Trait Implementations§
impl<E: Engine> Copy for Byte<E>
Auto Trait Implementations§
impl<E> Freeze for Byte<E>
impl<E> RefUnwindSafe for Byte<E>
impl<E> Send for Byte<E>
impl<E> Sync for Byte<E>
impl<E> Unpin for Byte<E>
impl<E> UnwindSafe for Byte<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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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