mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Add documentation for AdjacentMetadata
This commit is contained in:
parent
7077f0f1f3
commit
b9ebed14a5
1 changed files with 7 additions and 0 deletions
|
|
@ -6,6 +6,10 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::snapshot::InstanceSnapshot;
|
use crate::snapshot::InstanceSnapshot;
|
||||||
|
|
||||||
|
/// Represents metadata in a sibling file with the same basename.
|
||||||
|
///
|
||||||
|
/// As an example, hello.meta.json next to hello.lua would allow assigning
|
||||||
|
/// additional metadata to the instance resulting from hello.lua.
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct AdjacentMetadata {
|
pub struct AdjacentMetadata {
|
||||||
|
|
@ -47,4 +51,7 @@ impl AdjacentMetadata {
|
||||||
self.apply_ignore_unknown_instances(snapshot);
|
self.apply_ignore_unknown_instances(snapshot);
|
||||||
self.apply_properties(snapshot);
|
self.apply_properties(snapshot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Add method to allow selectively applying parts of metadata and
|
||||||
|
// throwing errors if invalid parts are specified.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue