pub fn build(mut template_inner: TemplateInner<G>) -> CapsuleInner<G, P> {
        template_inner.is_capsule = true;
        // Produce nice errors to make it clear that heads and headers don't work with
        // capsules
        #[cfg(engine)]
        {
            assert!(
                template_inner.head.is_none(),
                "capsules cannot set document metadata"
            );
            assert!(
                template_inner.set_headers.is_none(),
                "capsules cannot set headers"
            );
        }
        // Wipe the template's view function to make sure the errors aren't obscenely
        // weird
        template_inner.view = Box::new(|_, _, _, _| Ok((View::empty(), create_scope(|_| {}))));
        CapsuleInner {
            template_inner,
            capsule_view: Box::new(|_, _, _, _, _, _| Ok((View::empty(), create_scope(|_| {})))),
            // This must be manually specified
            fallback: None,
        }
    }
Creates a new [`CapsuleInner`] from the given [`TemplateInner`]. In
Perseus, capsules are really just special kinds of pages, so you
create them by first creating the underlying template. To make sure
you get a capsule instead of a template, you just don't call
`.build()` on the template, instead passing the [`TemplateInner`] to
this function.

**Warning:** [`TemplateInner`] has methods like `.view()` and
`.view_with_state()` for setting the views of your templates, but you
shouldn't use those when you're building a capsule, because those
functions won't let you use *properties* that can be passed from
pages that use your capsule. Instead, construct a [`TemplateInner`]
that has no views, and then use the `.view()` etc. functions on
[`CapsuleInner`] instead. (Unfortunately, dereferncing doesn't work
with the builder pattern, so this is the best we can do in Rust
right now.)

You will need to call `.build()` when you're done with this to get a
full [`Capsule`].
packages/perseus/src/template/capsule.rs