Struct prio::client::Client[][src]

pub struct Client { /* fields omitted */ }

The main object that can be used to create Prio shares

Client is used to create Prio shares.

Implementations

impl Client[src]

pub fn new(
    dimension: usize,
    public_key1: PublicKey,
    public_key2: PublicKey
) -> Option<Self>
[src]

Construct a new Prio client

pub fn encode_simple(
    &mut self,
    data: &[Field]
) -> Result<(Vec<u8>, Vec<u8>), EncryptError>
[src]

Construct a pair of encrypted shares based on the input data.

pub fn encode_with<F>(
    &mut self,
    init_function: F
) -> Result<(Vec<u8>, Vec<u8>), EncryptError> where
    F: FnOnce(&mut [Field]), 
[src]

Construct a pair of encrypted shares using a initilization function.

This might be slightly more efficient on large vectors, because one can avoid copying the input data.

Trait Implementations

impl Debug for Client[src]

Auto Trait Implementations

impl RefUnwindSafe for Client

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl UnwindSafe for Client

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<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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>,