pub enum RoundInputError {
AttemptToOverwriteReceivedMsg {
msgs_ids: [MsgId; 2],
sender: PartyIndex,
},
SenderIndexOutOfRange {
msg_id: MsgId,
sender: PartyIndex,
n: u16,
},
MismatchedMessageType {
msg_id: MsgId,
expected: MessageType,
actual: MessageType,
},
}Expand description
Error explaining why RoundInput wasn’t able to process a message
Variants§
AttemptToOverwriteReceivedMsg
Party sent two messages in one round
msgs_ids are ids of conflicting messages
Fields
§
sender: PartyIndexIndex of party who sent two messages in one round
SenderIndexOutOfRange
Unknown sender
This error is thrown when index of sender is not in [0; n) where n is number of
parties involved in the protocol (provided in RoundInput::new)
MismatchedMessageType
Received message type doesn’t match expectations
For instance, this error is returned when it’s expected to receive broadcast message, but party sent p2p message instead (which is rough protocol violation).
Trait Implementations§
Source§impl Debug for RoundInputError
impl Debug for RoundInputError
Source§impl Display for RoundInputError
impl Display for RoundInputError
Source§impl Error for RoundInputError
impl Error for RoundInputError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for RoundInputError
impl RefUnwindSafe for RoundInputError
impl Send for RoundInputError
impl Sync for RoundInputError
impl Unpin for RoundInputError
impl UnwindSafe for RoundInputError
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