mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Add RojoTree::get_ids_at_path
This commit is contained in:
parent
90e41f3ce9
commit
bcf4fea598
1 changed files with 8 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue