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