Trait oxygengine_user_interface::Prefab
source · [−]pub trait Prefab: Serialize + DeserializeOwned {
fn from_prefab(data: Value) -> Result<Self, PrefabError> { ... }
fn to_prefab(&self) -> Result<Value, 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
source
fn from_prefab(data: Value) -> Result<Self, PrefabError>
source