#[non_exhaustive]pub enum SpawnError {
DuplicateComponent(&'static str),
OutputTooSmall {
required: usize,
available: usize,
},
EntityCapacity {
required: usize,
prepared: usize,
},
ComponentCapacity {
component: &'static str,
required: usize,
prepared: usize,
},
IdentityCapacity,
AllocationFailed,
}Expand description
Failure to prepare storage or preflight a bounded spawn batch.
Separate from Error to preserve that enum’s exhaustive matches. A batch
returns this error together with all of its original owned bundles; see
World::try_spawn_batch for precedence and ownership rules.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DuplicateComponent(&'static str)
OutputTooSmall
EntityCapacity
Highest selected sparse slot plus one exceeds the prepared entity budget.
ComponentCapacity
A selected index exceeds this type’s explicitly prepared sparse budget.
IdentityCapacity
The request exceeds representable entity indices or usize arithmetic.
AllocationFailed
A standard-library try_reserve operation failed during preparation.
Trait Implementations§
Source§impl Clone for SpawnError
impl Clone for SpawnError
Source§fn clone(&self) -> SpawnError
fn clone(&self) -> SpawnError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpawnError
impl Debug for SpawnError
Source§impl Display for SpawnError
impl Display for SpawnError
Source§impl Error for SpawnError
impl Error for SpawnError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for SpawnError
impl PartialEq for SpawnError
impl Eq for SpawnError
impl StructuralPartialEq for SpawnError
Auto Trait Implementations§
impl Freeze for SpawnError
impl RefUnwindSafe for SpawnError
impl Send for SpawnError
impl Sync for SpawnError
impl Unpin for SpawnError
impl UnwindSafe for SpawnError
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