pub trait Prefab: Serialize + DeserializeOwned {
// Provided methods
fn from_prefab(data: PrefabValue) -> Result<Self, PrefabError> { ... }
fn to_prefab(&self) -> Result<PrefabValue, PrefabError> { ... }
}
Expand description
The Prefab
trait is implemented for types that are able to translate to and from
PrefabValue
’s
PrefabValue
’s can then, in turn, be serialized or deserialized for persistance, transfer, or
other purposes.
Provided Methods§
fn from_prefab(data: PrefabValue) -> Result<Self, PrefabError>
fn to_prefab(&self) -> Result<PrefabValue, PrefabError>
Object Safety§
This trait is not object safe.