Trait Prefab

Source
pub trait Prefab:
    Serialize
    + DeserializeOwned
    + Sized {
    // Provided methods
    fn from_prefab(data: &PrefabValue) -> Result<Self, PrefabError> { ... }
    fn from_prefab_with_extras(
        data: &PrefabValue,
        _named_entities: &HashMap<String, Entity>,
        _state_token: StateToken,
    ) -> Result<Self, PrefabError> { ... }
    fn to_prefab(&self) -> Result<PrefabValue, PrefabError> { ... }
    fn from_prefab_str(data: &str) -> Result<Self, PrefabError> { ... }
    fn to_prefab_string(&self) -> Result<String, PrefabError> { ... }
    fn post_from_prefab(&mut self) { ... }
}

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§