Struct parsec::Vote[][src]

pub struct Vote<T: NetworkEvent, P: PublicId> { /* fields omitted */ }

A helper struct carrying some data and a signature of this data.

Methods

impl<T: NetworkEvent, P: PublicId> Vote<T, P>
[src]

Creates a Vote for payload.

Returns the payload being voted for.

Returns the signature of this Vote's payload.

Validates this Vote's signature and payload against the given public ID.

Creates a Proof from this Vote. Returns Err if this Vote is not valid (i.e. if !self.is_valid()).

Trait Implementations

impl<T: Clone + NetworkEvent, P: Clone + PublicId> Clone for Vote<T, P> where
    P::Signature: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: PartialEq + NetworkEvent, P: PartialEq + PublicId> PartialEq for Vote<T, P> where
    P::Signature: PartialEq
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq + NetworkEvent, P: Eq + PublicId> Eq for Vote<T, P> where
    P::Signature: Eq
[src]

impl<T: PartialOrd + NetworkEvent, P: PartialOrd + PublicId> PartialOrd for Vote<T, P> where
    P::Signature: PartialOrd
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: Ord + NetworkEvent, P: Ord + PublicId> Ord for Vote<T, P> where
    P::Signature: Ord
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<T: Debug + NetworkEvent, P: Debug + PublicId> Debug for Vote<T, P> where
    P::Signature: Debug
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T, P> Send for Vote<T, P> where
    T: Send,
    <P as PublicId>::Signature: Send

impl<T, P> Sync for Vote<T, P> where
    T: Sync,
    <P as PublicId>::Signature: Sync