pub trait SpawnableList<R>: Sized {
// Required methods
fn spawn(this: MovingPtr<'_, Self>, world: &mut World, entity: Entity);
fn size_hint(&self) -> usize;
}
Expand description
Required Methods§
Sourcefn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Returns a size hint, which is used to reserve space for this list in a RelationshipTarget
. This should be
less than or equal to the actual size of the list. When in doubt, just use 0.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<R: Relationship> SpawnableList<R> for ()
impl<R: Relationship> SpawnableList<R> for ()
Source§impl<R: Relationship, B: Bundle<Effect: NoBundleEffect>> SpawnableList<R> for Vec<B>
impl<R: Relationship, B: Bundle<Effect: NoBundleEffect>> SpawnableList<R> for Vec<B>
Source§impl<R: Relationship, P: SpawnableList<R>> SpawnableList<R> for (P₁, P₂, …, Pₙ)
This trait is implemented for tuples up to 13 items long.
impl<R: Relationship, P: SpawnableList<R>> SpawnableList<R> for (P₁, P₂, …, Pₙ)
This trait is implemented for tuples up to 13 items long.