pub struct DummyVal { /* private fields */ }Expand description
Wrapper around u16.
Implementations§
Source§impl DummyVal
impl DummyVal
Sourcepub fn rand_bool<RNG: CryptoRng + RngCore>(rng: &mut RNG) -> Self
pub fn rand_bool<RNG: CryptoRng + RngCore>(rng: &mut RNG) -> Self
Generate a random boolean DummyVal.
Sourcepub fn rand<RNG: CryptoRng + RngCore>(modulus: u16, rng: &mut RNG) -> Self
pub fn rand<RNG: CryptoRng + RngCore>(modulus: u16, rng: &mut RNG) -> Self
Generate a random DummyVal.
Sourcepub fn to_crt(value: u128, modulus: u128) -> CrtBundle<Self>
pub fn to_crt(value: u128, modulus: u128) -> CrtBundle<Self>
Generate a new CrtBundle of value % modulus.
Sourcepub fn from_crt(crt: &Bundle<Self>, modulus: u128) -> u128
pub fn from_crt(crt: &Bundle<Self>, modulus: u128) -> u128
Convert a Bundle representing a CRT value into its underlying
u128.
Sourcepub fn to_binary(value: u128, nbits: usize) -> BinaryBundle<Self>
pub fn to_binary(value: u128, nbits: usize) -> BinaryBundle<Self>
Generate a new BinaryBundle of value.
Sourcepub fn from_binary(bin: &Bundle<Self>) -> u128
pub fn from_binary(bin: &Bundle<Self>) -> u128
Convert a Bundle representing a binary value into its underlying
u128.
Sourcepub fn to_mixed_radix(value: u128, radii: &[u16]) -> CrtBundle<Self>
pub fn to_mixed_radix(value: u128, radii: &[u16]) -> CrtBundle<Self>
Generate a new mixed radix form Bundle for value using the
provided radii.
Sourcepub fn from_mixed_radix(bundle: &CrtBundle<Self>) -> u128
pub fn from_mixed_radix(bundle: &CrtBundle<Self>) -> u128
Convert a Bundle representing mixed radix form into its underlying
u128.
Trait Implementations§
impl Copy for DummyVal
impl StructuralPartialEq for DummyVal
Auto Trait Implementations§
impl Freeze for DummyVal
impl RefUnwindSafe for DummyVal
impl Send for DummyVal
impl Sync for DummyVal
impl Unpin for DummyVal
impl UnsafeUnpin for DummyVal
impl UnwindSafe for DummyVal
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> Flatten for Twhere
T: Clone + HasModulus,
impl<T> Flatten for Twhere
T: Clone + HasModulus,
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§impl<T> IsSameType<T> for T
impl<T> IsSameType<T> for T
§type EqualityProposition = TrueEqualityProposition
type EqualityProposition = TrueEqualityProposition
The [
EqualityProposition] that Self == T