pub struct NonSync<T: ?Sized>(/* private fields */);
Expand description
Type used to access !Sync
storages.
Trait Implementations§
source§impl<T: Send + Unique> Borrow for NonSync<UniqueView<'_, T>>
impl<T: Send + Unique> Borrow for NonSync<UniqueView<'_, T>>
type View<'a> = NonSync<UniqueView<'a, T>>
source§fn borrow<'a>(
all_storages: &'a AllStorages,
all_borrow: Option<SharedBorrow<'a>>,
last_run: Option<TrackingTimestamp>,
current: TrackingTimestamp,
) -> Result<Self::View<'a>, GetStorage>
fn borrow<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, last_run: Option<TrackingTimestamp>, current: TrackingTimestamp, ) -> Result<Self::View<'a>, GetStorage>
This function is where the actual borrowing happens.
source§impl<T: Send + Unique> Borrow for NonSync<UniqueViewMut<'_, T>>
impl<T: Send + Unique> Borrow for NonSync<UniqueViewMut<'_, T>>
type View<'a> = NonSync<UniqueViewMut<'a, T>>
source§fn borrow<'a>(
all_storages: &'a AllStorages,
all_borrow: Option<SharedBorrow<'a>>,
last_run: Option<TrackingTimestamp>,
current: TrackingTimestamp,
) -> Result<Self::View<'a>, GetStorage>
fn borrow<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, last_run: Option<TrackingTimestamp>, current: TrackingTimestamp, ) -> Result<Self::View<'a>, GetStorage>
This function is where the actual borrowing happens.
source§impl<T: Send + Component, Track> Borrow for NonSync<View<'_, T, Track>>where
Track: Tracking,
impl<T: Send + Component, Track> Borrow for NonSync<View<'_, T, Track>>where
Track: Tracking,
type View<'a> = NonSync<View<'a, T, Track>>
source§fn borrow<'a>(
all_storages: &'a AllStorages,
all_borrow: Option<SharedBorrow<'a>>,
last_run: Option<TrackingTimestamp>,
current: TrackingTimestamp,
) -> Result<Self::View<'a>, GetStorage>
fn borrow<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, last_run: Option<TrackingTimestamp>, current: TrackingTimestamp, ) -> Result<Self::View<'a>, GetStorage>
This function is where the actual borrowing happens.
source§impl<T: Send + Component, Track> Borrow for NonSync<ViewMut<'_, T, Track>>where
Track: Tracking,
impl<T: Send + Component, Track> Borrow for NonSync<ViewMut<'_, T, Track>>where
Track: Tracking,
type View<'a> = NonSync<ViewMut<'a, T, Track>>
source§fn borrow<'a>(
all_storages: &'a AllStorages,
all_borrow: Option<SharedBorrow<'a>>,
last_run: Option<TrackingTimestamp>,
current: TrackingTimestamp,
) -> Result<Self::View<'a>, GetStorage>
fn borrow<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, last_run: Option<TrackingTimestamp>, current: TrackingTimestamp, ) -> Result<Self::View<'a>, GetStorage>
This function is where the actual borrowing happens.
source§impl<'a, T: Send + Unique> BorrowInfo for NonSync<UniqueView<'a, T>>
impl<'a, T: Send + Unique> BorrowInfo for NonSync<UniqueView<'a, T>>
source§fn borrow_info(info: &mut Vec<TypeInfo>)
fn borrow_info(info: &mut Vec<TypeInfo>)
This information is used during workload creation to determine which systems can run in parallel. Read more
source§fn enable_tracking(_: &mut Vec<fn(_: &AllStorages) -> Result<(), GetStorage>>)
fn enable_tracking(_: &mut Vec<fn(_: &AllStorages) -> Result<(), GetStorage>>)
Enable tracking on the
World
where this storage is borrowed.source§impl<'a, T: Send + Unique> BorrowInfo for NonSync<UniqueViewMut<'a, T>>
impl<'a, T: Send + Unique> BorrowInfo for NonSync<UniqueViewMut<'a, T>>
source§fn borrow_info(info: &mut Vec<TypeInfo>)
fn borrow_info(info: &mut Vec<TypeInfo>)
This information is used during workload creation to determine which systems can run in parallel. Read more
source§fn enable_tracking(_: &mut Vec<fn(_: &AllStorages) -> Result<(), GetStorage>>)
fn enable_tracking(_: &mut Vec<fn(_: &AllStorages) -> Result<(), GetStorage>>)
Enable tracking on the
World
where this storage is borrowed.source§impl<'a, T: Send + Component, Track> BorrowInfo for NonSync<View<'a, T, Track>>where
Track: Tracking,
impl<'a, T: Send + Component, Track> BorrowInfo for NonSync<View<'a, T, Track>>where
Track: Tracking,
source§fn borrow_info(info: &mut Vec<TypeInfo>)
fn borrow_info(info: &mut Vec<TypeInfo>)
This information is used during workload creation to determine which systems can run in parallel. Read more
source§fn enable_tracking(
enable_tracking_fn: &mut Vec<fn(_: &AllStorages) -> Result<(), GetStorage>>,
)
fn enable_tracking( enable_tracking_fn: &mut Vec<fn(_: &AllStorages) -> Result<(), GetStorage>>, )
Enable tracking on the
World
where this storage is borrowed.source§impl<'a, T: Send + Component, Track> BorrowInfo for NonSync<ViewMut<'a, T, Track>>where
Track: Tracking,
impl<'a, T: Send + Component, Track> BorrowInfo for NonSync<ViewMut<'a, T, Track>>where
Track: Tracking,
source§fn borrow_info(info: &mut Vec<TypeInfo>)
fn borrow_info(info: &mut Vec<TypeInfo>)
This information is used during workload creation to determine which systems can run in parallel. Read more
source§fn enable_tracking(
enable_tracking_fn: &mut Vec<fn(_: &AllStorages) -> Result<(), GetStorage>>,
)
fn enable_tracking( enable_tracking_fn: &mut Vec<fn(_: &AllStorages) -> Result<(), GetStorage>>, )
Enable tracking on the
World
where this storage is borrowed.source§impl<T: Component + Send> GetComponent for NonSync<&T>
impl<T: Component + Send> GetComponent for NonSync<&T>
type Out<'a> = Ref<'a, &'a T>
fn get<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, _current: TrackingTimestamp, entity: EntityId, ) -> Result<Self::Out<'a>, GetComponent>
source§impl<T: Component + Send> GetComponent for NonSync<&mut T>
impl<T: Component + Send> GetComponent for NonSync<&mut T>
type Out<'a> = RefMut<'a, &'a mut T>
fn get<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, current: TrackingTimestamp, entity: EntityId, ) -> Result<Self::Out<'a>, GetComponent>
source§impl<T: Unique + Send> GetUnique for NonSync<&T>
impl<T: Unique + Send> GetUnique for NonSync<&T>
type Out<'a> = NonSync<UniqueView<'a, T>>
fn get_unique<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, ) -> Result<Self::Out<'a>, GetStorage>
source§impl<T: Unique + Send> GetUnique for NonSync<&mut T>
impl<T: Unique + Send> GetUnique for NonSync<&mut T>
type Out<'a> = NonSync<UniqueViewMut<'a, T>>
fn get_unique<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, ) -> Result<Self::Out<'a>, GetStorage>
source§impl<T: Component + Send> IterComponent for NonSync<&T>
impl<T: Component + Send> IterComponent for NonSync<&T>
type Storage<'a> = FullRawWindow<'a, T>
type Borrow<'a> = SharedBorrow<'a>
fn into_abtract_mut<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, current: TrackingTimestamp, ) -> Result<(Self::Storage<'a>, Option<SharedBorrow<'a>>, Self::Borrow<'a>), GetStorage>
fn type_id() -> TypeId
fn dense(raw_window: &Self::Storage<'_>) -> *const EntityId
fn into_iter<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, current: TrackingTimestamp, ) -> Result<IterRef<'a, Self>, GetStorage>
source§impl<T: Component + Send> IterComponent for NonSync<&mut T>
impl<T: Component + Send> IterComponent for NonSync<&mut T>
type Storage<'a> = FullRawWindowMut<'a, T, <T as Component>::Tracking>
type Borrow<'a> = ExclusiveBorrow<'a>
fn into_abtract_mut<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, current: TrackingTimestamp, ) -> Result<(Self::Storage<'a>, Option<SharedBorrow<'a>>, Self::Borrow<'a>), GetStorage>
fn type_id() -> TypeId
fn dense(raw_window: &Self::Storage<'_>) -> *const EntityId
fn into_iter<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, current: TrackingTimestamp, ) -> Result<IterRef<'a, Self>, GetStorage>
source§impl<T: Component + Send> IterComponent for NonSync<Mut<'_, T>>
impl<T: Component + Send> IterComponent for NonSync<Mut<'_, T>>
type Storage<'a> = FullRawWindowMut<'a, T, Modification>
type Borrow<'a> = ExclusiveBorrow<'a>
fn into_abtract_mut<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, current: TrackingTimestamp, ) -> Result<(Self::Storage<'a>, Option<SharedBorrow<'a>>, Self::Borrow<'a>), GetStorage>
fn type_id() -> TypeId
fn dense(raw_window: &Self::Storage<'_>) -> *const EntityId
fn into_iter<'a>( all_storages: &'a AllStorages, all_borrow: Option<SharedBorrow<'a>>, current: TrackingTimestamp, ) -> Result<IterRef<'a, Self>, GetStorage>
source§impl<T: 'static + Component + Send> Storage for NonSync<SparseSet<T>>
impl<T: 'static + Component + Send> Storage for NonSync<SparseSet<T>>
source§fn delete(&mut self, entity: EntityId, current: TrackingTimestamp)
fn delete(&mut self, entity: EntityId, current: TrackingTimestamp)
Deletes an entity from this storage.
source§fn clear(&mut self, current: TrackingTimestamp)
fn clear(&mut self, current: TrackingTimestamp)
Deletes all components of this storage.
source§fn memory_usage(&self) -> Option<StorageMemoryUsage>
fn memory_usage(&self) -> Option<StorageMemoryUsage>
Returns how much memory this storage uses.
source§fn sparse_array(&self) -> Option<&SparseArray<EntityId, BUCKET_SIZE>>
fn sparse_array(&self) -> Option<&SparseArray<EntityId, BUCKET_SIZE>>
Returns a
SparseSet
’s internal SparseArray
.source§fn clear_all_removed_and_deleted(&mut self)
fn clear_all_removed_and_deleted(&mut self)
Clear all deletion and removal tracking data.
source§fn clear_all_removed_and_deleted_older_than_timestamp(
&mut self,
timestamp: TrackingTimestamp,
)
fn clear_all_removed_and_deleted_older_than_timestamp( &mut self, timestamp: TrackingTimestamp, )
Clear all deletion and removal tracking data older than some timestamp.
source§fn move_component_from(
&mut self,
other_all_storages: &mut AllStorages,
from: EntityId,
to: EntityId,
current: TrackingTimestamp,
other_current: TrackingTimestamp,
)
fn move_component_from( &mut self, other_all_storages: &mut AllStorages, from: EntityId, to: EntityId, current: TrackingTimestamp, other_current: TrackingTimestamp, )
Moves a component from a
World
to another.Auto Trait Implementations§
impl<T> Freeze for NonSync<T>
impl<T> RefUnwindSafe for NonSync<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for NonSync<T>
impl<T> Sync for NonSync<T>
impl<T> Unpin for NonSync<T>
impl<T> UnwindSafe for NonSync<T>where
T: UnwindSafe + ?Sized,
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<S> TupleRetainStorage for Swhere
S: 'static + Storage,
impl<S> TupleRetainStorage for Swhere
S: 'static + Storage,
source§fn retain(all_storages: &mut AllStorages, entity: EntityId)
fn retain(all_storages: &mut AllStorages, entity: EntityId)
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> WorldBorrow for Twhere
T: Borrow,
impl<T> WorldBorrow for Twhere
T: Borrow,
type WorldView<'a> = <T as Borrow>::View<'a>
source§fn world_borrow(
world: &World,
last_run: Option<TrackingTimestamp>,
current: TrackingTimestamp,
) -> Result<<T as WorldBorrow>::WorldView<'_>, GetStorage>
fn world_borrow( world: &World, last_run: Option<TrackingTimestamp>, current: TrackingTimestamp, ) -> Result<<T as WorldBorrow>::WorldView<'_>, GetStorage>
This function is where the actual borrowing happens.