xmtp_id/associations/ident/installation.rs
1use std::fmt::Display;
2
3#[derive(Debug, Clone, Eq, PartialEq, Hash)]
4pub struct Installation(pub Vec<u8>);
5
6impl Installation {
7 #[cfg(any(test, feature = "test-utils"))]
8 pub fn rand() -> Self {
9 Self(xmtp_common::rand_vec::<32>())
10 }
11}
12
13impl Display for Installation {
14 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15 write!(f, "{}", hex::encode(&self.0))
16 }
17}