use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(
all(target_arch = "wasm32", target_os = "unknown", feature = "ts-bindings"),
derive(tsify::Tsify)
)]
#[cfg_attr(
all(target_arch = "wasm32", target_os = "unknown", feature = "ts-bindings"),
tsify(into_wasm_abi, from_wasm_abi)
)]
#[non_exhaustive]
pub struct AppDataInfo {
pub cid: String,
#[serde(rename = "appDataContent")]
pub app_data_content: String,
#[serde(rename = "appDataHex")]
pub app_data_hex: String,
}
impl AppDataInfo {
#[must_use]
pub fn new(
cid: impl Into<String>,
app_data_content: impl Into<String>,
app_data_hex: impl Into<String>,
) -> Self {
Self {
cid: cid.into(),
app_data_content: app_data_content.into(),
app_data_hex: app_data_hex.into(),
}
}
}