agglayer_types/certificate/
index.rs1#[derive(
3 Clone,
4 Copy,
5 Debug,
6 Default,
7 Eq,
8 Ord,
9 PartialEq,
10 PartialOrd,
11 derive_more::Display,
12 serde::Deserialize,
13 serde::Serialize,
14)]
15#[cfg_attr(feature = "testutils", derive(arbitrary::Arbitrary))]
16#[serde(transparent)]
17pub struct CertificateIndex(u64);
18
19impl CertificateIndex {
20 pub const ZERO: CertificateIndex = CertificateIndex(0);
21
22 pub const fn new(index: u64) -> CertificateIndex {
23 CertificateIndex(index)
24 }
25
26 pub const fn as_u64(&self) -> u64 {
27 self.0
28 }
29}