Skip to main content

iota_types/
display.rs

1// Copyright (c) Mysten Labs, Inc.
2// Modifications Copyright (c) 2024 IOTA Stiftung
3// SPDX-License-Identifier: Apache-2.0
4
5use serde::Deserialize;
6
7use crate::{
8    collection_types::VecMap,
9    id::{ID, UID},
10};
11
12// TODO: add tests to keep in sync
13/// Rust version of the Move iota::display::Display type
14#[derive(Debug, Deserialize, Clone, Eq, PartialEq)]
15pub struct DisplayObject {
16    pub id: UID,
17    pub fields: VecMap<String, String>,
18    pub version: u16,
19}
20
21#[derive(Deserialize, Debug)]
22/// The event that is emitted when a `Display` version is "released".
23/// Serves for Display versioning.
24pub struct DisplayVersionUpdatedEvent {
25    pub id: ID,
26    pub version: u16,
27    pub fields: VecMap<String, String>,
28}