mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
parent
fe10da9a6c
commit
f0a602b48b
2 changed files with 4 additions and 4 deletions
|
|
@ -12,7 +12,7 @@ use super::InstanceMetadata;
|
||||||
// Possible future improvements:
|
// Possible future improvements:
|
||||||
// - Use refcounted/interned strings
|
// - Use refcounted/interned strings
|
||||||
// - Replace use of RbxValue with a sum of RbxValue + borrowed value
|
// - Replace use of RbxValue with a sum of RbxValue + borrowed value
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct InstanceSnapshot {
|
pub struct InstanceSnapshot {
|
||||||
/// A temporary ID applied to the snapshot that's used for Ref properties.
|
/// A temporary ID applied to the snapshot that's used for Ref properties.
|
||||||
pub snapshot_id: Option<RbxId>,
|
pub snapshot_id: Option<RbxId>,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use super::{InstanceMetadata, InstanceSnapshot};
|
||||||
/// These patches shouldn't be persisted: there's no mechanism in place to make
|
/// These patches shouldn't be persisted: there's no mechanism in place to make
|
||||||
/// sure that another patch wasn't applied before this one that could cause a
|
/// sure that another patch wasn't applied before this one that could cause a
|
||||||
/// conflict!
|
/// conflict!
|
||||||
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct PatchSet {
|
pub struct PatchSet {
|
||||||
pub removed_instances: Vec<RbxId>,
|
pub removed_instances: Vec<RbxId>,
|
||||||
pub added_instances: Vec<PatchAdd>,
|
pub added_instances: Vec<PatchAdd>,
|
||||||
|
|
@ -30,14 +30,14 @@ impl<'a> PatchSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A patch containing an instance that was added to the tree.
|
/// A patch containing an instance that was added to the tree.
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct PatchAdd {
|
pub struct PatchAdd {
|
||||||
pub parent_id: RbxId,
|
pub parent_id: RbxId,
|
||||||
pub instance: InstanceSnapshot,
|
pub instance: InstanceSnapshot,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A patch indicating that properties of an instance changed.
|
/// A patch indicating that properties of an instance changed.
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct PatchUpdate {
|
pub struct PatchUpdate {
|
||||||
pub id: RbxId,
|
pub id: RbxId,
|
||||||
pub changed_name: Option<String>,
|
pub changed_name: Option<String>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue