Struct paillier::coding::integral::Code
[−]
[src]
pub struct Code<I> { pub component_count: usize, pub component_size: usize, pub _phantom: PhantomData<I>, }
Integral code for scalars and vectors.
Fields
component_count: usize
Number of components to expect in vectors.
component_size: usize
Bits to allocate for each component in vectors, including gap space.
_phantom: PhantomData<I>
Methods
impl<I> Code<I>
[src]
Trait Implementations
impl<I> Encoder<u64> for Code<I> where I: From<u64>
[src]
type Target = Plaintext<I, u64>
fn encode(&self, x: &u64) -> Self::Target
Encode T
types into Target
types.
impl<I> Encoder<Vec<u64>> for Code<I> where I: One,
I: Clone,
I: From<u64>,
I: Shl<usize, Output=I>,
I: Add<I, Output=I>,
&'a I: Rem<&'b I, Output=I>,
&'a I: Shr<usize, Output=I>
[src]
I: Clone,
I: From<u64>,
I: Shl<usize, Output=I>,
I: Add<I, Output=I>,
&'a I: Rem<&'b I, Output=I>,
&'a I: Shr<usize, Output=I>
type Target = Plaintext<I, u64>
fn encode(&self, x: &Vec<u64>) -> Self::Target
Encode T
types into Target
types.
impl<I> Decoder<u64> for Code<I> where u64: ConvertFrom<I>
[src]
type Source = Plaintext<I, u64>
fn decode(&self, x: &Plaintext<I, u64>) -> u64
Decode Source
types into T
types.
impl<I> Decoder<Vec<u64>> for Code<I> where u64: ConvertFrom<I>,
I: One,
I: Clone,
I: From<u64>,
I: Shl<usize, Output=I>,
I: Add<I, Output=I>,
&'a I: Rem<&'b I, Output=I>,
&'a I: Shr<usize, Output=I>
[src]
I: One,
I: Clone,
I: From<u64>,
I: Shl<usize, Output=I>,
I: Add<I, Output=I>,
&'a I: Rem<&'b I, Output=I>,
&'a I: Shr<usize, Output=I>