pub fn load_style_data(&self, data: &StyleData) {
            let mut reg = self.inner.registry.borrow_mut();

            for StyleDataContent { id, key, .. } in data.0.iter() {
                let key = Rc::new(key.clone());

                match reg.styles.entry(key.clone()) {
                    Entry::Occupied(m) => {
                        assert_eq!(
                            m.get().id(),
                            id,
                            "An existing style has been rendered with a different class, this is not supported, please load style data first!"
                        );
                    }
                    Entry::Vacant(m) => {
                        m.insert(
                            StyleContent {
                                id: id.clone(),
                                style_str: key.ast.to_style_str(Some(id)),
                                manager: self.downgrade(),
                                key: key.clone(),
                            }
                            .into(),
                        );
                    }
                }
            }
        }
Loads StyleData of current style manager.

# Note

If you are using [`ManagerProvider`](crate::yew::ManagerProvider),
this behaviour is managed automatically.

# Panics

This method should be called as early as possible.
If the same style to be loaded already existed in the manager, it will panic.
packages/stylist/src/manager/mod.rs