[−][src]Enum parsec::Observation
An enum of the various network events for which a peer can vote.
Variants
Genesis group
Fields of Genesis
group: BTreeSet<P>
Members of the genesis group.
Extra arbitrary information for use by the client.
Note: this can be set through the genesis_related_info
argument of
Parsec::from_genesis
.
Vote to add the indicated peer to the network.
Fields of Add
Vote to remove the indicated peer from the network.
Fields of Remove
Output only: Do not vote for it. Vote to accuse a peer of malicious behaviour.
Fields of Accusation
offender: P
Public id of the peer committing the malice.
malice: Malice<T, P>
Type of the malice committed.
Vote for an event which is opaque to Parsec.
StartDkg(BTreeSet<P>)
Internal only: No blocks with it. Can be voted as an input.
Output only: Do not vote for it. Will have empty proof set.
Fields of DkgResult
participants: BTreeSet<P>
DKG Participants: These peers have a secret key.
dkg_result: DkgResultWrapper
DKG result. public_key_set will be shared state. secret_key_share will be unique to each peers: all participating peers will have one assuming less than 1/3 malicious. (Ignored in comparaison and serialization).
Internal only: Do not vote for it or expect it to come in blocks. Vote for the next message (Part or Ack) to be handled for the Distributed Key Generation algorithm used by our common coin.
Implementations
impl<T: NetworkEvent, P: PublicId> Observation<T, P>
[src]
pub fn is_opaque(&self) -> bool
[src]
Is this observation's payload opaque to PARSEC?
pub fn is_dkg_message(&self) -> bool
[src]
Is this observation an internal DkgMessage
pub fn is_internal(&self) -> bool
[src]
Is this observation an internal and should not be published in a Block
pub fn is_dkg_result(&self) -> bool
[src]
Is this observation a result only DkgResult
Trait Implementations
impl<T: Clone + NetworkEvent, P: Clone + PublicId> Clone for Observation<T, P>
[src]
fn clone(&self) -> Observation<T, P>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: NetworkEvent, P: PublicId> Debug for Observation<T, P>
[src]
impl<'de, T: NetworkEvent, P: PublicId> Deserialize<'de> for Observation<T, P>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T: Eq + NetworkEvent, P: Eq + PublicId> Eq for Observation<T, P>
[src]
impl<T: Hash + NetworkEvent, P: Hash + PublicId> Hash for Observation<T, P>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: Ord + NetworkEvent, P: Ord + PublicId> Ord for Observation<T, P>
[src]
fn cmp(&self, other: &Observation<T, P>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: PartialEq + NetworkEvent, P: PartialEq + PublicId> PartialEq<Observation<T, P>> for Observation<T, P>
[src]
fn eq(&self, other: &Observation<T, P>) -> bool
[src]
fn ne(&self, other: &Observation<T, P>) -> bool
[src]
impl<T: PartialOrd + NetworkEvent, P: PartialOrd + PublicId> PartialOrd<Observation<T, P>> for Observation<T, P>
[src]
fn partial_cmp(&self, other: &Observation<T, P>) -> Option<Ordering>
[src]
fn lt(&self, other: &Observation<T, P>) -> bool
[src]
fn le(&self, other: &Observation<T, P>) -> bool
[src]
fn gt(&self, other: &Observation<T, P>) -> bool
[src]
fn ge(&self, other: &Observation<T, P>) -> bool
[src]
impl<T: NetworkEvent, P: PublicId> Serialize for Observation<T, P>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<T: NetworkEvent, P: PublicId> StructuralEq for Observation<T, P>
[src]
impl<T: NetworkEvent, P: PublicId> StructuralPartialEq for Observation<T, P>
[src]
Auto Trait Implementations
impl<T, P> RefUnwindSafe for Observation<T, P> where
P: RefUnwindSafe,
T: RefUnwindSafe,
<P as PublicId>::Signature: RefUnwindSafe,
P: RefUnwindSafe,
T: RefUnwindSafe,
<P as PublicId>::Signature: RefUnwindSafe,
impl<T, P> Send for Observation<T, P> where
P: Send,
T: Send,
<P as PublicId>::Signature: Send,
P: Send,
T: Send,
<P as PublicId>::Signature: Send,
impl<T, P> Sync for Observation<T, P> where
P: Sync,
T: Sync,
<P as PublicId>::Signature: Sync,
P: Sync,
T: Sync,
<P as PublicId>::Signature: Sync,
impl<T, P> Unpin for Observation<T, P> where
P: Unpin,
T: Unpin,
P: Unpin,
T: Unpin,
impl<T, P> UnwindSafe for Observation<T, P> where
P: RefUnwindSafe + UnwindSafe,
T: UnwindSafe,
<P as PublicId>::Signature: UnwindSafe,
P: RefUnwindSafe + UnwindSafe,
T: UnwindSafe,
<P as PublicId>::Signature: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,