Add RojoTree::get_ids_at_path

This commit is contained in:
Lucien Greathouse
2019-10-01 10:37:06 -07:00
parent 90e41f3ce9
commit bcf4fea598

View File

@@ -1,4 +1,7 @@
use std::{collections::HashMap, path::PathBuf};
use std::{
collections::HashMap,
path::{Path, PathBuf},
};
use rbx_dom_weak::{Descendants, RbxId, RbxInstance, RbxInstanceProperties, RbxTree, RbxValue};
@@ -135,6 +138,10 @@ impl RojoTree {
}
}
pub fn get_ids_at_path(&self, path: &Path) -> &[RbxId] {
self.path_to_ids.get(path)
}
fn get_metadata(&self, id: RbxId) -> Option<&InstanceMetadata> {
self.metadata_map.get(&id)
}