pub struct BatchHeader<N: Network> { /* private fields */ }
Implementations§
source§impl<N: Network> BatchHeader<N>
impl<N: Network> BatchHeader<N>
source§impl<N: Network> BatchHeader<N>
impl<N: Network> BatchHeader<N>
sourcepub fn compute_batch_id(
author: Address<N>,
round: u64,
timestamp: i64,
transmission_ids: &IndexSet<TransmissionID<N>>,
previous_certificate_ids: &IndexSet<Field<N>>
) -> Result<Field<N>>
pub fn compute_batch_id( author: Address<N>, round: u64, timestamp: i64, transmission_ids: &IndexSet<TransmissionID<N>>, previous_certificate_ids: &IndexSet<Field<N>> ) -> Result<Field<N>>
Returns the batch ID.
source§impl<N: Network> BatchHeader<N>
impl<N: Network> BatchHeader<N>
sourcepub const MAX_CERTIFICATES: usize = 200usize
pub const MAX_CERTIFICATES: usize = 200usize
The maximum number of certificates in a batch.
sourcepub const MAX_SOLUTIONS: usize = N::MAX_SOLUTIONS
pub const MAX_SOLUTIONS: usize = N::MAX_SOLUTIONS
The maximum number of solutions in a batch.
sourcepub const MAX_TRANSACTIONS: usize = 65_536usize
pub const MAX_TRANSACTIONS: usize = 65_536usize
The maximum number of transactions in a batch.
sourcepub const MAX_TRANSMISSIONS: usize = _
pub const MAX_TRANSMISSIONS: usize = _
The maximum number of transmissions in a batch.
source§impl<N: Network> BatchHeader<N>
impl<N: Network> BatchHeader<N>
source§impl<N: Network> BatchHeader<N>
impl<N: Network> BatchHeader<N>
Returns the author.
sourcepub const fn transmission_ids(&self) -> &IndexSet<TransmissionID<N>>
pub const fn transmission_ids(&self) -> &IndexSet<TransmissionID<N>>
Returns the transmission IDs.
sourcepub const fn previous_certificate_ids(&self) -> &IndexSet<Field<N>>
pub const fn previous_certificate_ids(&self) -> &IndexSet<Field<N>>
Returns the batch certificate IDs for the previous round.
source§impl<N: Network> BatchHeader<N>
impl<N: Network> BatchHeader<N>
sourcepub fn contains(&self, transmission_id: impl Into<TransmissionID<N>>) -> bool
pub fn contains(&self, transmission_id: impl Into<TransmissionID<N>>) -> bool
Returns true
if the batch contains the specified transmission ID
.
Trait Implementations§
source§impl<N: Clone + Network> Clone for BatchHeader<N>
impl<N: Clone + Network> Clone for BatchHeader<N>
source§fn clone(&self) -> BatchHeader<N>
fn clone(&self) -> BatchHeader<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<N: Network> Debug for BatchHeader<N>
impl<N: Network> Debug for BatchHeader<N>
source§impl<'de, N: Network> Deserialize<'de> for BatchHeader<N>
impl<'de, N: Network> Deserialize<'de> for BatchHeader<N>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl<N: Network> Display for BatchHeader<N>
impl<N: Network> Display for BatchHeader<N>
source§impl<N: Network> FromBytes for BatchHeader<N>
impl<N: Network> FromBytes for BatchHeader<N>
source§impl<N: Network> FromStr for BatchHeader<N>
impl<N: Network> FromStr for BatchHeader<N>
source§impl<N: PartialEq + Network> PartialEq for BatchHeader<N>
impl<N: PartialEq + Network> PartialEq for BatchHeader<N>
source§fn eq(&self, other: &BatchHeader<N>) -> bool
fn eq(&self, other: &BatchHeader<N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<N: Network> Serialize for BatchHeader<N>
impl<N: Network> Serialize for BatchHeader<N>
source§impl<N: Network> ToBytes for BatchHeader<N>
impl<N: Network> ToBytes for BatchHeader<N>
impl<N: Eq + Network> Eq for BatchHeader<N>
impl<N: Network> StructuralEq for BatchHeader<N>
impl<N: Network> StructuralPartialEq for BatchHeader<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for BatchHeader<N>where <N as Environment>::Field: RefUnwindSafe, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe, <N as Environment>::Projective: RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe, <N as Network>::TransactionID: RefUnwindSafe,
impl<N> Send for BatchHeader<N>
impl<N> Sync for BatchHeader<N>
impl<N> Unpin for BatchHeader<N>where <N as Environment>::Field: Unpin, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: Unpin, <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin, <N as Network>::TransactionID: Unpin,
impl<N> UnwindSafe for BatchHeader<N>where <N as Environment>::Field: UnwindSafe, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnwindSafe, <N as Environment>::Projective: UnwindSafe, <N as Environment>::Scalar: UnwindSafe, <N as Network>::TransactionID: UnwindSafe,
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
§impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere T: DeserializeOwned,
fn take_from_value<D>( value: &mut Value, field: &str ) -> Result<T, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.