add hot reloading context trait

This commit is contained in:
Evan Almloff committed 2022-12-10 14:09:59 -06:00
1 parent f16e3be2c2
commit 2131e5658b
4 files changed
+116 -32

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
pub trait HotReloadingContext {
fn map_attribute(
element_name_rust: &str,
attribute_name_rust: &str,
) -> Option<(&'static str, Option<&'static str>)>;
fn map_element(element_name_rust: &str) -> Option<(&'static str, Option<&'static str>)>;
}
pub struct Empty;
impl HotReloadingContext for Empty {
fn map_attribute(_: &str, _: &str) -> Option<(&'static str, Option<&'static str>)> {
None
}
fn map_element(_: &str) -> Option<(&'static str, Option<&'static str>)> {
None
}
}