rs_sb3/
project.rs

1//! Module to deal with Scratch project
2
3use crate::monitor::Monitor;
4use crate::prelude::*;
5use crate::target::SpriteOrStage;
6
7#[derive(Debug, PartialEq, Deserialize, Serialize)]
8#[serde(rename_all = "camelCase")]
9pub struct Project {
10    pub meta: Meta,
11    pub extensions: Json,
12    pub monitors: Vec<Monitor>,
13    pub targets: Vec<SpriteOrStage>,
14}
15
16/// About the project's author and the Scratch version used.
17#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
18#[serde(rename_all = "camelCase")]
19pub struct Meta {
20    /// Always `3.0.0`.
21    pub semver: String,
22
23    /// The version of the Scratch VM that the project was created with.
24    pub vm: String,
25
26    /// The user agent of the last person to edit the project from the editor.
27    pub agent: String,
28}