pub struct SpawnOneRelated<R: Relationship, B: Bundle> { /* private fields */ }Expand description
A Bundle that:
- Contains a
RelationshipTargetcomponent (associated with the givenRelationship). This reserves space for a single entity. - Spawns a single related entity containing the given
BBundleand the givenRelationship.
This is intended to be created using SpawnRelated.
Trait Implementations§
Source§impl<R: Relationship, B: Bundle> Bundle for SpawnOneRelated<R, B>
impl<R: Relationship, B: Bundle> Bundle for SpawnOneRelated<R, B>
Source§fn get_component_ids(
components: &Components,
ids: &mut impl FnMut(Option<ComponentId>),
)
fn get_component_ids( components: &Components, ids: &mut impl FnMut(Option<ComponentId>), )
Source§impl<R: Relationship, B: Bundle> DynamicBundle for SpawnOneRelated<R, B>
impl<R: Relationship, B: Bundle> DynamicBundle for SpawnOneRelated<R, B>
Source§type Effect = SpawnOneRelated<R, B>
type Effect = SpawnOneRelated<R, B>
An operation on the entity that happens after inserting this bundle.
Source§unsafe fn get_components(
ptr: MovingPtr<'_, Self>,
func: &mut impl FnMut(StorageType, OwningPtr<'_>),
)
unsafe fn get_components( ptr: MovingPtr<'_, Self>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), )
Moves the components out of the bundle. Read more
Source§unsafe fn apply_effect(
ptr: MovingPtr<'_, MaybeUninit<Self>>,
entity: &mut EntityWorldMut<'_>,
)
unsafe fn apply_effect( ptr: MovingPtr<'_, MaybeUninit<Self>>, entity: &mut EntityWorldMut<'_>, )
Applies the after-effects of spawning this bundle. Read more
Auto Trait Implementations§
impl<R, B> Freeze for SpawnOneRelated<R, B>where
B: Freeze,
impl<R, B> RefUnwindSafe for SpawnOneRelated<R, B>where
B: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, B> Send for SpawnOneRelated<R, B>
impl<R, B> Sync for SpawnOneRelated<R, B>
impl<R, B> Unpin for SpawnOneRelated<R, B>
impl<R, B> UnwindSafe for SpawnOneRelated<R, B>where
B: UnwindSafe,
R: UnwindSafe,
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
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.