pub fn get_state<T: AnyFreeze + Clone>(&self, url: &PathMaybeWithLocale) -> Option<T> {
        let map = self.map.borrow();
        match map.get(url) {
            Some(entry) => {
                let state = match &entry.state {
                    PssState::Some(state) => state,
                    // We don't care whether there could be state in future, there isn't any right
                    // now
                    _ => return None,
                };
                state.as_any().downcast_ref::<T>().map(|val| (*val).clone())
            }
            None => None,
        }
    }
Gets an element out of the state by its type and URL. If the element
stored for the given URL doesn't match the provided type, `None` will be
returned.

This will NOT return any document metadata, if any exists.
packages/perseus/src/state/state_store.rs