[][src]Struct cryptoballot::Identifier

pub struct Identifier {
    pub election_id: [u8; 15],
    pub transaction_type: TransactionType,
    pub unique_id: Option<[u8; 16]>,
}

Transaction identifier

The identifier defines the election, transction-type, and a unique identifier.

Fields

election_id: [u8; 15]transaction_type: TransactionTypeunique_id: Option<[u8; 16]>

Methods

impl Identifier[src]

pub fn new(
    election_id: Identifier,
    transaction_type: TransactionType,
    unique_info: &[u8]
) -> Self
[src]

Creat a new Identifier

pub fn new_for_election() -> Self[src]

Create a new identifier for an election

pub fn to_bytes(&self) -> Vec<u8>[src]

Trait Implementations

impl Clone for Identifier[src]

impl Copy for Identifier[src]

impl Debug for Identifier[src]

impl<'de> Deserialize<'de> for Identifier[src]

impl Display for Identifier[src]

impl Eq for Identifier[src]

impl FromStr for Identifier[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for Identifier[src]

impl PartialEq<Identifier> for Identifier[src]

impl Serialize for Identifier[src]

impl StructuralEq for Identifier[src]

impl StructuralPartialEq for Identifier[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,