[][src]Struct fancy_garbling::CrtBundle

pub struct CrtBundle<W: Clone + HasModulus>(_);

Bundle which is explicitly CRT-representation.

Methods

impl<W: Clone + HasModulus> CrtBundle<W>[src]

pub fn new(ws: Vec<W>) -> CrtBundle<W>[src]

Create a new CRT bundle from a vector of wires.

pub fn extract(self) -> Bundle<W>[src]

Extract the underlying bundle from this CRT bundle.

pub fn composite_modulus(&self) -> u128[src]

Return the product of all the wires' moduli.

Methods from Deref<Target = Bundle<W>>

pub fn moduli(&self) -> Vec<u16>[src]

Return the moduli of all the wires in the bundle.

pub fn wires(&self) -> &[W][src]

Extract the wires from this bundle.

pub fn size(&self) -> usize[src]

Get the number of wires in this bundle.

pub fn is_binary(&self) -> bool[src]

Whether this bundle only contains residues in mod 2.

pub fn with_moduli(&self, moduli: &[u16]) -> Bundle<W>[src]

Returns a new bundle only containing wires with matching moduli.

pub fn iter(&self) -> Iter<W>[src]

Access the underlying iterator

Trait Implementations

impl<W: Clone + HasModulus> From<Bundle<W>> for CrtBundle<W>[src]

impl<W: Clone + HasModulus> Clone for CrtBundle<W>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<W: Clone + HasModulus> Deref for CrtBundle<W>[src]

type Target = Bundle<W>

The resulting type after dereferencing.

Auto Trait Implementations

impl<W> Send for CrtBundle<W> where
    W: Send

impl<W> Sync for CrtBundle<W> where
    W: Sync

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> FromCast<T> for T

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> FromBits<T> for T

impl<T> Same<T> for T

type Output = T

Should always be Self