Skip to main content

SimulationSet

Struct SimulationSet 

Source
pub struct SimulationSet {
    pub app: App,
    /* private fields */
}
Expand description

A set of simulations, useful for efficiently doing multiple simulations.

Fields§

§app: App

Implementations§

Source§

impl SimulationSet

Source

pub fn new(chunks: ChunkStorage) -> Self

Source

pub fn tick(&mut self)

Source

pub fn spawn(&mut self, player: SimulatedPlayerBundle) -> Entity

Source

pub fn despawn(&mut self, entity: Entity)

Source

pub fn position(&self, entity: Entity) -> Vec3

Auto Trait Implementations§

§

impl !Freeze for SimulationSet

§

impl !RefUnwindSafe for SimulationSet

§

impl !Send for SimulationSet

§

impl !Sync for SimulationSet

§

impl !UnwindSafe for SimulationSet

§

impl Forget for SimulationSet

§

impl Move for SimulationSet

§

impl Unpin for SimulationSet
where *const u8 is !null: Unpin, NonZero<u32>: Unpin, &'static Location<'static>: Unpin, Arc<SharedAllocator>: Unpin, Box<ArrayVec<Entity, 128>>: Unpin, &'static str: Unpin, String: Unpin, *const (): Unpin, Box<RelationshipAccessorInitializer>: Unpin, Arc<dyn Fn(&mut Table, &mut SparseSets, Tick, TableRow, Entity, MaybeLocation)>: Unpin, Align4<u32>: Unpin, Align1<u8>: Unpin, Align8<usize>: Unpin, Box<[ComponentStatus]>: Unpin, Box<[RequiredComponentConstructor]>: Unpin, Box<[ComponentId]>: Unpin, Box<[ArchetypeComponentInfo]>: Unpin, Box<[Option<NonMaxUsize>]>: Unpin, InternalBitFlags: Unpin, *const UnsafeCell<Tick> is !null: Unpin, *const UnsafeCell<&'static Location<'static>> is !null: Unpin, NonZero<usize>: Unpin, Box<[Column]>: Unpin, NonZero<u64>: Unpin, Box<dyn Plugin>: Unpin, &'static dyn ScheduleLabel: Unpin, Box<dyn FnMut(&mut World, &mut World) + Send>: Unpin, &'static dyn AppLabel: Unpin, Box<dyn FnOnce(App) -> AppExit>: Unpin, Arc<RwLock<RawRwLock, World>>: Unpin,

§

impl UnsafeUnpin for SimulationSet
where *const u8 is !null: UnsafeUnpin, PhantomData<EntityMeta>: UnsafeUnpin, *const ArcInner<SharedAllocator> is !null: UnsafeUnpin, PhantomData<ArcInner<SharedAllocator>>: UnsafeUnpin, *const ArrayVec<Entity, 128> is !null: UnsafeUnpin, PhantomData<ArrayVec<Entity, 128>>: UnsafeUnpin, PhantomData<Option<ComponentInfo>>: UnsafeUnpin, PhantomData<(TypeId, ComponentId)>: UnsafeUnpin, Align4<u32>: UnsafeUnpin, Align1<u8>: UnsafeUnpin, PhantomData<(TypeId, QueuedRegistration)>: UnsafeUnpin, PhantomData<QueuedRegistration>: UnsafeUnpin, Align8<usize>: UnsafeUnpin, PhantomData<Option<Entity>>: UnsafeUnpin, PhantomData<ComponentId>: UnsafeUnpin, PhantomData<Archetype>: UnsafeUnpin, PhantomData<(ArchetypeComponents, ArchetypeId)>: UnsafeUnpin, PhantomData<(ComponentId, HashMap<ArchetypeId, ArchetypeRecord>)>: UnsafeUnpin, PhantomData<ComponentSparseSet>: UnsafeUnpin, PhantomData<Option<NonMaxUsize>>: UnsafeUnpin, PhantomData<Table>: UnsafeUnpin, PhantomData<(Box<[ComponentId]>, TableId)>: UnsafeUnpin, PhantomData<NonSendData>: UnsafeUnpin, PhantomData<BundleInfo>: UnsafeUnpin, PhantomData<(TypeId, BundleId)>: UnsafeUnpin, PhantomData<(Box<[ComponentId]>, BundleId)>: UnsafeUnpin, PhantomData<(BundleId, Vec<StorageType>)>: UnsafeUnpin, PhantomData<(ComponentId, BundleId)>: UnsafeUnpin, PhantomData<(BundleId, StorageType)>: UnsafeUnpin, PhantomData<(Entity, unsafe fn(DeferredWorld<'_>, Entity, &TriggerContext, PtrMut<'_>, PtrMut<'_>))>: UnsafeUnpin, PhantomData<(ComponentId, CachedComponentObservers)>: UnsafeUnpin, PhantomData<(Entity, EntityEquivalentHashMap<Entity, unsafe fn(DeferredWorld<'_>, Entity, &TriggerContext, PtrMut<'_>, PtrMut<'_>)>)>: UnsafeUnpin, PhantomData<(EventKey, CachedObservers)>: UnsafeUnpin, PhantomData<Messages<RemovedComponentEntity>>: UnsafeUnpin, PhantomData<MaybeUninit<u8>>: UnsafeUnpin, PhantomData<&'static Location<'static>>: UnsafeUnpin, PhantomData<Box<dyn Plugin>>: UnsafeUnpin, PhantomData<(String, ())>: UnsafeUnpin, &'static dyn ScheduleLabel: UnsafeUnpin, *const dyn FnMut(&mut World, &mut World) + Send is !null: UnsafeUnpin, PhantomData<dyn FnMut(&mut World, &mut World) + Send>: UnsafeUnpin, PhantomData<(Interned<dyn AppLabel>, SubApp)>: UnsafeUnpin, *const dyn FnOnce(App) -> AppExit is !null: UnsafeUnpin, PhantomData<dyn FnOnce(App) -> AppExit>: UnsafeUnpin, *const ArcInner<RwLock<RawRwLock, World>> is !null: UnsafeUnpin, PhantomData<ArcInner<RwLock<RawRwLock, World>>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T> ⓘ
where T: Sized,

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T> ⓘ

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T> ⓘ

Applies the [Compat] adapter by mutable reference. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<A, B> Interchangeable<A> for B
where A: From<B>, B: From<A>,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoResult<T> for T

§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
§

impl<A> Is for A
where A: Any,

§

fn is<T>() -> bool
where T: Any,

Checks if the current type “is” another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more