pub struct Prefab {
pub archetypes: Vec<PrefabArchetype>,
}Fields§
§archetypes: Vec<PrefabArchetype>Implementations§
Source§impl Prefab
impl Prefab
pub fn register_relation_serializer<T: Serialize + DeserializeOwned + Component>( serialization: &mut SerializationRegistry, )
pub fn from_world<const LOCKING: bool>( world: &World, serialization: &SerializationRegistry, registry: &Registry, ) -> Result<Self, PrefabError>
pub fn from_entities<const LOCKING: bool>( world: &World, entities: impl IntoIterator<Item = Entity>, processor: &WorldProcessor, serialization: &SerializationRegistry, registry: &Registry, ) -> Result<Self, PrefabError>
pub fn to_world<const LOCKING: bool>( &self, processor: &WorldProcessor, serialization: &SerializationRegistry, registry: &Registry, additional_components: impl Bundle + Clone, ) -> Result<(World, HashMap<Entity, Entity>), PrefabError>
pub fn entities(&self) -> impl Iterator<Item = Entity> + '_
pub fn rows(&self) -> impl Iterator<Item = PrefabRow<'_>>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Prefab
impl<'de> Deserialize<'de> for Prefab
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Prefab
Auto Trait Implementations§
impl Freeze for Prefab
impl RefUnwindSafe for Prefab
impl Send for Prefab
impl Sync for Prefab
impl Unpin for Prefab
impl UnwindSafe for Prefab
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more