Skip to main content

canic_core/ids/
intent.rs

1use crate::cdk::types::BoundedString128;
2use serde::{Deserialize, Serialize};
3use std::fmt::{self, Display};
4
5///
6/// IntentId
7///
8
9#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize)]
10pub struct IntentId(pub u64);
11
12impl Display for IntentId {
13    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14        write!(f, "{}", self.0)
15    }
16}
17
18///
19/// IntentResourceKey
20///
21
22pub type IntentResourceKey = BoundedString128;