pub fn template_ref<H: Html>(mut self, val: impl Into<Forever<Template<H>>>) -> Self {
        assert_eq!(
            TypeId::of::<G>(),
            TypeId::of::<H>(),
            "mismatched render backends"
        );
        let val = val.into();
        // SAFETY: We asserted that `G == H` above.
        let val: Forever<Template<G>> = unsafe { std::mem::transmute(val) };

        let entity: Forever<Entity<G>> = match val {
            Forever::Owned(capsule) => capsule.inner.into(),
            Forever::StaticRef(capsule_ref) => (&capsule_ref.inner).into(),
        };

        let path = entity.get_path();
        self.entities.insert(path, entity);
        self
    }
Adds a single new template to the app. This can accept either an owned
[`Template`] or a static reference to one, as might be created by a
`lazy_static!`. The latter would force you to specify the rendering
backend type (`G`) manually, using a smart alias like
`PerseusNodeType`. This method performs internal type coercions to make
statics work neatly.

If your templates come from functions like `get_template`, that are
generic over `G: Html`, you can use `.template()`, to avoid having
to specify `::<G>` manually.

See [`Template`] for further details, and the book for further details
on the differences between the function and reference patterns.
packages/perseus/src/init.rs