1mod component_path;
7mod data_path;
8mod entity_path;
9mod entity_path_filter;
10mod entity_path_part;
11pub mod natural_ordering;
12mod parse_path;
13
14pub use component_path::ComponentPath;
15pub use data_path::DataPath;
16pub use entity_path::{EntityPath, EntityPathHash};
17pub use entity_path_filter::{
18 EntityPathFilter, EntityPathFilterError, EntityPathRule, EntityPathSubs, FilterEvaluation,
19 ResolvedEntityPathFilter, ResolvedEntityPathRule, RuleEffect,
20};
21pub use entity_path_part::EntityPathPart;
22pub use parse_path::{PathParseError, tokenize_by};
23
24#[doc(hidden)]
28pub mod __private {
29 pub use ::std::{string, vec};
30}
31
32#[macro_export]
43macro_rules! entity_path_vec {
44 () => {
45 $crate::path::__private::vec::Vec::<$crate::EntityPathPart>::new()
47 };
48 ($($part: expr),* $(,)?) => {
49 $crate::path::__private::vec![ $($crate::EntityPathPart::from(
50 $crate::path::__private::string::ToString::to_string(&$part)
51 ),)+ ]
52 };
53}
54
55#[macro_export]
63macro_rules! entity_path {
64 ($($part: expr),* $(,)?) => {
65 $crate::EntityPath::from($crate::entity_path_vec![ $($part,)* ])
66 };
67}
68
69#[cfg(test)]
70mod tests {
71 use super::*;
72
73 #[test]
74 fn entity_path_macros_empty() {
75 assert_eq!(entity_path_vec!(), vec![]);
77 assert_eq!(entity_path!(), EntityPath::from(vec![]));
78 }
79}