pub enum Msg<D: Digest, M> {
Echo {
round: u16,
hash: Output<D>,
},
Main(M),
}Available on crate feature
echo-broadcast only.Expand description
Message of the protocol with echo broadcast round(s)
Variants§
Echo
Message from echo broadcast sub-protocol
Fields
§
round: u16Indicates for which round of main protocol this echo message is transmitted
Note that this field is controlled by potential malicious party. If it sets it to the round that doesn’t exist, the protocol will likely be aborted with an error that we received a message from unregistered round, which may appear as implementation error (i.e. API misuse), but in fact it’s a malicious abort.
Main(M)
Message from the main protocol
Trait Implementations§
Source§impl<D: Digest, M: ProtocolMsg> ProtocolMsg for Msg<D, M>
impl<D: Digest, M: ProtocolMsg> ProtocolMsg for Msg<D, M>
impl<D: Digest, M: PartialEq> Eq for Msg<D, M>
Auto Trait Implementations§
impl<D, M> Freeze for Msg<D, M>
impl<D, M> RefUnwindSafe for Msg<D, M>where
M: RefUnwindSafe,
<<D as OutputSizeUser>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<D, M> Send for Msg<D, M>where
M: Send,
impl<D, M> Sync for Msg<D, M>where
M: Sync,
impl<D, M> Unpin for Msg<D, M>
impl<D, M> UnwindSafe for Msg<D, M>
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