pub trait RotSender: Connected + Send {
type Error;
// Required method
fn send_into(
&mut self,
ots: &mut impl Buf<[Block; 2]>,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
// Provided method
fn send(
&mut self,
count: usize,
) -> impl Future<Output = Result<Vec<[Block; 2]>, Self::Error>> + Send { ... }
}
Expand description
A random OT sender.
Required Associated Types§
Required Methods§
Sourcefn send_into(
&mut self,
ots: &mut impl Buf<[Block; 2]>,
) -> impl Future<Output = Result<(), Self::Error>> + Send
fn send_into( &mut self, ots: &mut impl Buf<[Block; 2]>, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Store OTs in the provided Buf
fer.
Note that implementations might temporarily take ownership of the
Buf
pointed to by ots
. If the future returned by this method is
dropped befire completion, ots
might point at an empty Buf
.
For large number of OTs, using
HugePageMemory
can
significantly improve performance on Linux systems.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.