Struct prio::client::Client [−][src]
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]
dimension: usize,
public_key1: PublicKey,
public_key2: PublicKey
) -> Option<Self>
Construct a new Prio client
pub fn encode_simple(
&mut self,
data: &[Field]
) -> Result<(Vec<u8>, Vec<u8>), EncryptError>
[src]
&mut self,
data: &[Field]
) -> Result<(Vec<u8>, Vec<u8>), EncryptError>
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]
&mut self,
init_function: F
) -> Result<(Vec<u8>, Vec<u8>), EncryptError> where
F: FnOnce(&mut [Field]),
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,