Skip to main content

ExecutionContext

Struct ExecutionContext 

Source
pub struct ExecutionContext<S, N>
where S: MpcScheme, N: Network,
{ /* private fields */ }

Implementations§

Source§

impl<S, N> ExecutionContext<S, N>
where S: MpcScheme, N: Network,

Source

pub fn new(config: MpcConfig<S>, network: N) -> Result<Self, Whatever>

Source

pub fn execution_state(&self) -> &ExecutionState

Source

pub async fn handshake(&mut self) -> Result<(SendLen, RecvLen), Whatever>

Source

pub async fn do_offline(&mut self) -> Result<(SendLen, RecvLen), Whatever>

Source

pub fn prepare_input<I>(&mut self, user_inputs: I) -> Result<(), Whatever>
where I: IntoIterator<Item = (WireId, S::Input)>,

Source

pub async fn do_online(&mut self) -> Result<(SendLen, RecvLen), Whatever>

Source

pub fn dump_wires_with_filter<P>(&self, predicate: P)
where P: FnMut(&S::Wire) -> bool,

Trait Implementations§

Source§

impl<S, N> Drop for ExecutionContext<S, N>
where S: MpcScheme, N: Network,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<S, N> Freeze for ExecutionContext<S, N>
where N: Freeze, S: Freeze, <S as MpcScheme>::Context: Freeze,

§

impl<S, N> RefUnwindSafe for ExecutionContext<S, N>

§

impl<S, N> Send for ExecutionContext<S, N>
where N: Send, S: Send, <S as MpcScheme>::Context: Send, <S as MpcScheme>::Wire: Send, <S as MpcScheme>::Operation: Send,

§

impl<S, N> Sync for ExecutionContext<S, N>
where N: Sync, S: Sync, <S as MpcScheme>::Context: Sync, <S as MpcScheme>::Wire: Sync, <S as MpcScheme>::Operation: Sync,

§

impl<S, N> Unpin for ExecutionContext<S, N>
where N: Unpin, S: Unpin, <S as MpcScheme>::Context: Unpin, <S as MpcScheme>::Wire: Unpin, <S as MpcScheme>::Operation: Unpin,

§

impl<S, N> UnsafeUnpin for ExecutionContext<S, N>

§

impl<S, N> UnwindSafe for ExecutionContext<S, N>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.