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 iota_sdk_move_types::iota_framework::{
6 object::{ID, UID},
7 vec_map::VecMap,
8};
9use serde::Deserialize;
10
11// TODO: add tests to keep in sync
12/// Rust version of the Move iota::display::Display type
13#[derive(Debug, Deserialize, Clone, Eq, PartialEq)]
14pub struct DisplayObject {
15 pub id: UID,
16 pub fields: VecMap<String, String>,
17 pub version: u16,
18}
19
20#[derive(Deserialize, Debug)]
21/// The event that is emitted when a `Display` version is "released".
22/// Serves for Display versioning.
23pub struct DisplayVersionUpdatedEvent {
24 pub id: ID,
25 pub version: u16,
26 pub fields: VecMap<String, String>,
27}