pub struct Receiver { /* private fields */ }
Expand description
Private set intersection receiver.
Implementations§
source§impl Receiver
impl Receiver
sourcepub fn init<C: AbstractChannel, RNG: CryptoRng + RngCore>(
channel: &mut C,
rng: &mut RNG
) -> Result<Self, Error>
pub fn init<C: AbstractChannel, RNG: CryptoRng + RngCore>( channel: &mut C, rng: &mut RNG ) -> Result<Self, Error>
Initialize the PSI receiver.
sourcepub fn receive<C: AbstractChannel, RNG: CryptoRng + RngCore>(
&mut self,
inputs: &[Vec<u8>],
channel: &mut C,
rng: &mut RNG
) -> Result<Vec<Vec<u8>>, Error>
pub fn receive<C: AbstractChannel, RNG: CryptoRng + RngCore>( &mut self, inputs: &[Vec<u8>], channel: &mut C, rng: &mut RNG ) -> Result<Vec<Vec<u8>>, Error>
Run the PSI protocol over inputs
.
sourcepub fn receive_payloads<C: AbstractChannel, RNG: CryptoRng + RngCore>(
&mut self,
inputs: &[Vec<u8>],
channel: &mut C,
rng: &mut RNG
) -> Result<HashMap<Vec<u8>, Block>, Error>
pub fn receive_payloads<C: AbstractChannel, RNG: CryptoRng + RngCore>( &mut self, inputs: &[Vec<u8>], channel: &mut C, rng: &mut RNG ) -> Result<HashMap<Vec<u8>, Block>, Error>
Run the PSI protocol over inputs
, receiving a vector of tuples consisting of
the intersection items and associated payloads.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Receiver
impl RefUnwindSafe for Receiver
impl Send for Receiver
impl Sync for Receiver
impl Unpin for Receiver
impl UnwindSafe for Receiver
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> 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