CompleteRoundError

Enum CompleteRoundError 

Source
pub enum CompleteRoundError<ProcessErr, IoErr> {
    ProcessMsg(ProcessErr),
    Router(RouterError),
    Io(IoErr),
    UnexpectedEof,
}
Expand description

Error returned by MpcParty::complete

May indicate malicious behavior (e.g. adversary sent a message that aborts protocol execution) or some misconfiguration of the protocol network (e.g. received a message from the round that was not registered via Mpc::add_round).

Variants§

§

ProcessMsg(ProcessErr)

RoundStore returned an error

Refer to this rounds store documentation to understand why it could fail

§

Router(RouterError)

Router error

Indicates that for some reason router was not able to process a message. This can be the case of:

  • Router API misuse
    E.g. when received a message from the round that was not registered in the router
  • Improper RoundStore implementation
    Indicates that round store is not properly implemented and contains a flaw.
    For instance, this error is returned when round store indicates that it doesn’t need any more messages (RoundStore::wants_more returns false), but then it didn’t output anything (RoundStore::output returns Err(_))
  • Bug in the router

This error is always related to some implementation flaw or bug: either in the code that uses the router, or in the round store implementation, or in the router itself. When implementation is correct, this error never appears. Thus, it should not be possible for the adversary to “make this error happen.”

§

Io(IoErr)

Receiving the next message resulted into I/O error

§

UnexpectedEof

Channel of incoming messages was closed before protocol completion

Implementations§

Source§

impl<ProcessErr, IoErr> CompleteRoundError<ProcessErr, IoErr>

Source

pub fn map_io_err<E>( self, f: impl FnOnce(IoErr) -> E, ) -> CompleteRoundError<ProcessErr, E>

Maps I/O error

Source

pub fn map_process_err<E>( self, f: impl FnOnce(ProcessErr) -> E, ) -> CompleteRoundError<E, IoErr>

Trait Implementations§

Source§

impl<ProcessErr: Debug, IoErr: Debug> Debug for CompleteRoundError<ProcessErr, IoErr>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<ProcessErr, IoErr> Error for CompleteRoundError<ProcessErr, IoErr>
where ProcessErr: Error, Self: Debug + Display,

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

§

impl<ProcessErr, IoErr> Freeze for CompleteRoundError<ProcessErr, IoErr>
where ProcessErr: Freeze, IoErr: Freeze,

§

impl<ProcessErr, IoErr> RefUnwindSafe for CompleteRoundError<ProcessErr, IoErr>
where ProcessErr: RefUnwindSafe, IoErr: RefUnwindSafe,

§

impl<ProcessErr, IoErr> Send for CompleteRoundError<ProcessErr, IoErr>
where ProcessErr: Send, IoErr: Send,

§

impl<ProcessErr, IoErr> Sync for CompleteRoundError<ProcessErr, IoErr>
where ProcessErr: Sync, IoErr: Sync,

§

impl<ProcessErr, IoErr> Unpin for CompleteRoundError<ProcessErr, IoErr>
where ProcessErr: Unpin, IoErr: Unpin,

§

impl<ProcessErr, IoErr> UnwindSafe for CompleteRoundError<ProcessErr, IoErr>
where ProcessErr: UnwindSafe, IoErr: UnwindSafe,

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more