pub enum SceneCommand {
Spawn {
id: EntityId,
},
AddComponent {
entity_id: EntityId,
component_type: String,
component_data: Vec<u8>,
},
SetParent {
child_id: EntityId,
parent_id: EntityId,
},
}Expand description
A single, atomic operation required to construct a scene.
Variants§
Spawn
Spawns a new, empty entity with a specific ID from the original scene.
Fields
§
id: EntityIdThe ID to assign to the newly spawned entity.
AddComponent
Adds a component to a specified entity.
Fields
§
entity_id: EntityIdThe ID of the entity to which the component should be added.
SetParent
Establishes a parent-child relationship between two entities.
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for SceneCommand
impl<'__de, __Context> BorrowDecode<'__de, __Context> for SceneCommand
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Debug for SceneCommand
impl Debug for SceneCommand
Source§impl<__Context> Decode<__Context> for SceneCommand
impl<__Context> Decode<__Context> for SceneCommand
Source§impl<'de> Deserialize<'de> for SceneCommand
impl<'de> Deserialize<'de> for SceneCommand
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
Source§impl Encode for SceneCommand
impl Encode for SceneCommand
Auto Trait Implementations§
impl Freeze for SceneCommand
impl RefUnwindSafe for SceneCommand
impl Send for SceneCommand
impl Sync for SceneCommand
impl Unpin for SceneCommand
impl UnwindSafe for SceneCommand
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